00000400 Starting Address Assembler used: EASy68K Editor/Assembler v5.15.02 Created On: 20-3-2015 17:53:48 00000000 1 ; 68EC000 MONITOR Version 3.00, modified 1/5/2006. 00000000 2 ; 00000000 3 ; Version 3.00 modification makes the SBC capable of 00000000 4 ; ececuting the EASy68K TRAP #15 tasks 0-2, 4-7, 9 00000000 5 ; and 12-14. This enables the user to switch to the 00000000 6 ; windows oriented, public domain, EASy68K 00000000 7 ; assembler-emulator package. 00000000 8 ; 00000000 9 ; Based on Antonakos's monitor with substantial changes 00000000 10 ; since the original version lacked many features. 00000000 11 ; Register display, register modify, tracing and 00000000 12 ; break-pointing were added by Sol Rosenstark (SR). 00000000 13 ; Disassembly was added by Dave Harrison (DH). 00000000 14 ; 00000000 15 ; Serial port assignments 00000000 =00010000 16 DREG EQU $10000 ;serial data port 00000000 =00010001 17 CSREG EQU $10001 ;control/status port 00000000 =00000002 18 DAVBIT EQU $2 ;data available bit 00000000 =00000001 19 BFEBIT EQU $1 ;buffer empty bit 00000000 20 ; Ram storage assignments. 00000000 =00008000 21 RAM EQU $8000 ;Change for other decoding 00000000 =00008000 22 RAMLEN EQU $8000 ;$8000 for 62256 00000000 =00010000 23 ENDRAM EQU RAM+RAMLEN 00000000 =0000FEB0 24 USTCK EQU ENDRAM-$150 ;user stack pointer 00000000 =0000FF36 25 STACK EQU ENDRAM-$CA ;system stack pointer 00000000 =0000FF36 26 OLD_PC EQU ENDRAM-$CA ;preceding PC 00000000 =0000FF3A 27 UNADR EQU ENDRAM-$C6 ;unasm start address 00000000 =0000FF3E 28 UASMCMD EQU ENDRAM-$C2 ;unasm cmd buf. 32 char 00000000 =0000FF46 29 UASMOPR EQU ENDRAM-$BA ;****** 00000000 =0000FF47 30 SPARE EQU ENDRAM-$B9 ;spare byte for future 00000000 31 ;use 00000000 =0000FF48 32 REGTYP EQU ENDRAM-$B8 ;information for return 00000000 33 ;from regmod cmd 00000000 =0000FF60 34 PRTBUF EQU ENDRAM-$A0 ;16 char print buffer 00000000 =0000FF70 35 INPBUF EQU ENDRAM-$90 ;32 char input buffer 00000000 =0000FF90 36 SAVREGS EQU ENDRAM-$70 ;D0-D7/A0-A6 storage 00000000 =0000FFCC 37 SAV_A7 EQU ENDRAM-$34 ;A7 storage 00000000 =0000FFD0 38 SAV_PC EQU ENDRAM-$30 ;PC storage 00000000 =0000FFD4 39 SAV_SR EQU ENDRAM-$2C ;SR storage 00000000 =0000FFD6 40 DUMPADR EQU ENDRAM-$2A ;dump start address 00000000 41 ; The 2 permanent breakpoint addresses go below 00000000 =0000FFDA 42 BP_AD3 EQU ENDRAM-$26 00000000 =0000FFDE 43 BP_AD4 EQU ENDRAM-$22 00000000 44 ; Temporary breakpoint addresses go below 00000000 =0000FFE2 45 BP_ADS1 EQU ENDRAM-$1E 00000000 =0000FFE6 46 BP_ADS2 EQU ENDRAM-$1A 00000000 =0000FFEA 47 BP_ADS3 EQU ENDRAM-$16 00000000 =0000FFEE 48 BP_ADS4 EQU ENDRAM-$12 00000000 49 ; Saved breakpoint opcodes go below 00000000 =0000FFF2 50 OPCOD1 EQU ENDRAM-$E 00000000 =0000FFF4 51 OPCOD2 EQU ENDRAM-$C 00000000 =0000FFF6 52 OPCOD3 EQU ENDRAM-$A 00000000 =0000FFF8 53 OPCOD4 EQU ENDRAM-$8 00000000 54 ; 00000000 =0000FFFA 55 FP_FLG EQU ENDRAM-$6 ;TRACE 1st pass flag 00000000 =0000FFFB 56 SKIPFLG EQU ENDRAM-$5 ;Go skip 1 instruction flag 00000000 =0000FFFC 57 S2_FLG EQU ENDRAM-$4 ;LOAD S2 line flag 00000000 =0000FFFD 58 ECHOFLG EQU ENDRAM-$3 ;Flag for task 12 of EASy68K 00000000 59 ; miscellaneous equates 00000000 =00004E4A 60 TRPTEN EQU $4E4A 00000000 =00004E4B 61 TRPELF EQU $4E4B 00000000 =0000000D 62 NUMCMD EQU 13 ;# commands checked 00000000 =0000008F 63 DUMPBYT EQU $8F ;# of chars in dump 00000000 =0000000D 64 CR EQU $D 00000000 =0000000A 65 LF EQU $A 00000000 =00000008 66 BS EQU 8 00000000 67 ; equates for RAM testing of exceptions 00000000 =00008000 68 TRP_11 EQU RAM ;TRAP #11 00000000 =00008004 69 TRP_12 EQU RAM+4 ;TRAP #12 00000000 =00008008 70 TRP_13 EQU RAM+8 ;TRAP #13 00000000 =0000800C 71 TRP_14 EQU RAM+12 ;TRAP #14 00000000 =00008010 72 FUTURE EQU RAM+16 00000000 73 ; 00000000 74 ORG 0 00000000 75 ; The code below goes into the ROM vector table 00000000= 0000FF36 76 DC.L STACK ;RESET: initial SSP 00000004= 00000400 77 DC.L START ;RESET: initial PC 00000008= 00001E68 78 DC.L BUSERR 0000000C= 00001E76 79 DC.L ADDERR 00000010= 00001EB4 80 DC.L ILEGAL 00000014= 00001EE6 81 DC.L DIVZERO 00000018= 00000400 82 DC.L START ;CHK not implemented 0000001C= 00001F6E 83 DC.L TRAP_V 00000020= 00001F7A 84 DC.L PRIVIOL ;Privilege violation 00000024= 00000F5E 85 DC.L TRACE 00000028= 00001F0A 86 DC.L LINE_A 0000002C= 00001F3C 87 DC.L LINE_F 00000030 88 ;As a precaution, skip reserved vectors 0000007C 89 ORG $7C 0000007C= 00001F86 90 DC.L LEVEL_7 00000080= 00001FA0 91 DC.L TO_CHARIN ;TRAP #0 00000084= 00001FA6 92 DC.L TO_CHAROUT ;TRAP #1 00000088= 00001FAC 93 DC.L TO_CRLF ;TRAP #2 0000008C= 00001FB2 94 DC.L TO_PRTMSG ;TRAP #3 00000090= 00001FB8 95 DC.L TO_PRT_BYT ;TRAP #4 00000094= 00001FBE 96 DC.L TO_PRT_WRD ;TRAP #5 00000098= 00001FC4 97 DC.L TO_PRT_LON ;TRAP #6 0000009C= 00001FCA 98 DC.L TO_GET_BYT ;TRAP #7 000000A0= 00001FD0 99 DC.L TO_GETADR ;TRAP #8 000000A4= 00000628 100 DC.L TRP_9 ;TRAP #9 000000A8= 0000064E 101 DC.L TRP_10 ;TRAP #10 000000AC= 00008000 102 DC.L TRP_11 ;TRAP #11 000000B0= 00008004 103 DC.L TRP_12 ;TRAP #12 000000B4= 00008008 104 DC.L TRP_13 ;TRAP #13 000000B8= 0000800C 105 DC.L TRP_14 ;TRAP #14 000000BC= 000008BE 106 DC.L TRP_15 ;TRAP #15 000000C0 107 ; 000000C0 108 ; The address below can be much lower if 000000C0 109 ; few interrupts are used. 00000400 110 ORG $400 ;start of monitor 00000400 111 ; 00000400 6100 075A 112 START BSR NULLREG ;init user regs 00000404 6100 0434 113 BSR SERINI ;init ser. chip 00000408 6100 05D6 114 BSR SIGN_ON ;greet user 0000040C 115 ; 0000040C 116 ; This point is reentered after each command 0000040C 117 ; is executed, so various things are reset. It 0000040C 118 ; then sends the prompt and calls GETLIN to 0000040C 119 ; obtain a line of KBD input terminated by 0000040C 120 ; a CR. The typed line is in the INPBUF. 0000040C 027C 7FFF 121 GET_CMD ANDI.W #$7FFF,SR ;disable tracing 00000410 0279 7FFF 0000FFD4 122 ANDI.W #$7FFF,SAV_SR ;fix the USR 00000418 2E7C 0000FF36 123 MOVEA.L #STACK,A7 ;init stack 0000041E 6100 0482 124 BSR CRLF 00000422 123C 0025 125 MOVE.B #'%',D1 ;output prompt 00000426 6100 044E 126 BSR CHAROUT 0000042A 6100 06CE 127 BSR GETLIN ;fill INPBUF from KBD 0000042E 2C7C 0000FF70 128 MOVEA.L #INPBUF,A6 ;repoint to buffer 00000434 6100 071A 129 BSR SKIPSP ;skip leading SPs 00000438 130 ; 00000438 131 ; A6 now points to the first non SP char. 00000438 132 ; This is put in D1, changed to UC. It will 00000438 133 ; put the last character preceding a CR or 00000438 134 ; SP into D2 and go on to SEARCH. Thus 00000438 135 ; typing command ABCD is the same as D. 00000438 136 ; This routine leaves A6 pointing one beyond 00000438 137 ; the CR or SP which follows the principal 00000438 138 ; command character where it stays until the 00000438 139 ; command service routine is executed. 00000438 121E 140 INCOM MOVE.B (A6)+,D1 0000043A 6100 06AC 141 BSR UP_CASE 0000043E 0C01 000D 142 CMPI.B #CR,D1 ;test for CR 00000442 670A 143 BEQ.S SEARCH 00000444 0C01 0020 144 CMPI.B #' ',D1 ;test for SP 00000448 6704 145 BEQ.S SEARCH 0000044A 1401 146 MOVE.B D1,D2 ;insert it into D2 0000044C 60EA 147 BRA.S INCOM ;get next char 0000044E 148 ; 0000044E 149 ; Put the # of commands in D5, the command 0000044E 150 ; addresses in A1 and the command character 0000044E 151 ; addresses in A2. If the command letter is 0000044E 152 ; legit then jump to the command routine, 0000044E 153 ; else signal by typing "Bad Command." 0000044E 1A3C 000D 154 SEARCH MOVE.B #NUMCMD,D5 ;# of cmds 00000452 227C 000024F0 155 MOVEA.L #CMD_ADR,A1 ;A1 -> cmd addrs 00000458 247C 00002524 156 MOVEA.L #COMANDS,A2 ;A2 -> cmd chars 0000045E B41A 157 TSTNEXT CMP.B (A2)+,D2 ;test again 00000460 670A 158 BEQ.S DO_JUMP 00000462 5889 159 ADDQ.L #4,A1 ;point to next cmd 00000464 5305 160 SUBQ.B #1,D5 ;all cmds checked? 00000466 66F6 161 BNE.S TSTNEXT 00000468 6000 05D0 162 BRA CMDERR ;illegal command 0000046C 2251 163 DO_JUMP MOVEA.L (A1),A1 ;get command addr 0000046E 4ED1 164 JMP (A1) ;and go execute it 00000470 165 ; 00000470 166 ; Fill memory between 2 addresses with a 00000470 167 ; HEX value. 00000470 6100 064A 168 FILL BSR GETADR ;get start addr 00000474 2242 169 MOVEA.L D2,A1 00000476 6100 0644 170 BSR GETADR ;get end addr 0000047A 5282 171 ADDQ.L #1,D2 ;Needed because using (A1)+ 0000047C 2442 172 MOVEA.L D2,A2 0000047E 6100 063C 173 BSR GETADR ;get HEX byte 00000482 B5C9 174 FILLEM CMPA.L A1,A2 ;at end yet? 00000484 6786 175 BEQ GET_CMD 00000486 12C2 176 MOVE.B D2,(A1)+ ;move'em 00000488 60F8 177 BRA.S FILLEM 0000048A 178 ; 0000048A 179 ; Dumps memory. The starting address is 0000048A 180 ; fixed to end in 00. Displays in rows of 0000048A 181 ; 16 bytes. Displays ASCII equivalents too. 0000048A 0C2E 000D FFFF 182 DUMP CMPI.B #CR,-1(A6) ;is previous CR? 00000490 6612 183 BNE.S DUMP0 ;no, so proceed 00000492 2439 0000FFD6 184 MOVE.L DUMPADR,D2 ;get old starting address 00000498 2842 185 MOVEA.L D2,A4 0000049A 0682 0000008F 186 ADDI.L #DUMPBYT,D2 ;get standard # of lines 000004A0 2A42 187 MOVEA.L D2,A5 000004A2 603A 188 BRA.S ADR_OUT ;all done, so dump 000004A4 0C16 002C 189 DUMP0 CMPI.B #',',(A6) ;is char a comma? 000004A8 660C 190 BNE.S DUMP0A ;no, then get new start addr 000004AA 2439 0000FFD6 191 MOVE.L DUMPADR,D2 ;get old dump addr 000004B0 2A42 192 MOVEA.L D2,A5 ;into A5 000004B2 528E 193 ADDQ.L #1,A6 ;point past comma 000004B4 601C 194 BRA.S DUMP1 ;get count 000004B6 6100 0604 195 DUMP0A BSR GETADR ;get start address 000004BA 0202 00F0 196 ANDI.B #$F0,D2 ;zero lower nibble 000004BE 2842 197 MOVEA.L D2,A4 000004C0 0C2E 000D FFFF 198 CMPI.B #CR,-1(A6) ;is previous CR? 000004C6 660A 199 BNE.S DUMP1 ;no, so proceed 000004C8 0682 0000008F 200 ADDI.L #DUMPBYT,D2 000004CE 2A42 201 MOVEA.L D2,A5 000004D0 600C 202 BRA.S ADR_OUT 000004D2 6100 05E8 203 DUMP1 BSR GETADR ;get # of lines to display 000004D6 5382 204 SUBQ.L #1,D2 ;reduce by 1 000004D8 E98A 205 LSL.L #4,D2 ;x16 bytes per line 000004DA 2A42 206 MOVEA.L D2,A5 000004DC DBCC 207 ADDA.L A4,A5 ;add the start address 000004DE 6100 03C2 208 ADR_OUT BSR CRLF ;new line please 000004E2 240C 209 MOVE.L A4,D2 ;print address 000004E4 6100 0530 210 BSR PRT_SIX 000004E8 6100 03CE 211 BSR TWO_SP ;and some spaces 000004EC 141C 212 BYTEOUT MOVE.B (A4)+,D2 ;get a byte 000004EE 6100 04FC 213 BSR PRT_BYT ;print the byte 000004F2 6100 03BC 214 BSR SPACE 000004F6 220C 215 MOVE.L A4,D1 ;done 16 yet? 000004F8 0281 0000000F 216 ANDI.L #$F,D1 000004FE 66EC 217 BNE.S BYTEOUT 00000500 99FC 00000010 218 SUBA.L #16,A4 ;back up 16 bytes 00000506 6100 03A8 219 BSR SPACE 0000050A 121C 220 ASC_OUT MOVE.B (A4)+,D1 ;get a byte 0000050C 0C01 0020 221 CMPI.B #' ',D1 ;is it printable? 00000510 6B06 222 BMI.S UN_PRT 00000512 0C01 007D 223 CMPI.B #$7D,D1 00000516 6B04 224 BMI.S SEND_IT 00000518 123C 002E 225 UN_PRT MOVE.B #'.',D1 ;unprintables -> . 0000051C 6100 0358 226 SEND_IT BSR CHAROUT ;print ASCII equiv 00000520 240C 227 MOVE.L A4,D2 ;done 16 yet? 00000522 0282 0000000F 228 ANDI.L #$F,D2 00000528 66E0 229 BNE.S ASC_OUT 0000052A 23CC 0000FFD6 230 MOVE.L A4,DUMPADR 00000530 6100 0320 231 BSR INSTAT ;key pressed? 00000534 670C 232 BEQ.S SEND1 ;no, go on 00000536 6100 032E 233 BSR CHARIN ;yes, get the char 0000053A 0C01 0003 234 CMPI.B #3,D1 ;Is it ^C? 0000053E 6700 FECC 235 BEQ GET_CMD ;If yes then quit 00000542 BBCC 236 SEND1 CMPA.L A4,A5 ;Is A4 > A5? 00000544 6B00 FEC6 237 BMI GET_CMD ;Yes, then quit 00000548 6094 238 BRA.S ADR_OUT 0000054A 239 ; 0000054A 240 ; Set breakpoints and transfer execution 0000054A 241 ; to the user program. 0000054A 242 ; G starts execution at current address 0000054A 243 ; G is obvious 0000054A 244 ; G , continues from current 0000054A 245 ; program counter. 0000054A 0C2E 000D FFFF 246 GO CMPI.B #CR,-1(A6) ;is previous CR? 00000550 6738 247 BEQ.S GO3 ;yes, so start 00000552 0C16 002C 248 CMPI.B #',',(A6) ;is char a comma? 00000556 6604 249 BNE.S GO1 ;no, then go on 00000558 528E 250 ADDQ.L #1,A6 ;point past comma 0000055A 6012 251 BRA.S GO2 ;get breakpoints 0000055C 252 ; get execution address 0000055C 6100 055E 253 GO1 BSR GETADR 00000560 23C2 0000FFD0 254 MOVE.L D2,SAV_PC ;save it 00000566 0C2E 000D FFFF 255 CMPI.B #CR,-1(A6) ;is previous CR? 0000056C 671C 256 BEQ.S GO3 ;yes, so start 0000056E 257 ; get first breakpoint address 0000056E 6100 054C 258 GO2 BSR GETADR 00000572 23C2 0000FFE2 259 MOVE.L D2,BP_ADS1 ;save it 00000578 0C2E 000D FFFF 260 CMPI.B #CR,-1(A6) ;is previous CR? 0000057E 670A 261 BEQ.S GO3 ;yes, so start 00000580 262 ; get second breakpoint address 00000580 6100 053A 263 BSR GETADR 00000584 23C2 0000FFE6 264 MOVE.L D2,BP_ADS2 ;save it 0000058A 265 ; Now move-in the 2 permanent addresses 0000058A 23F9 0000FFDA 0000FFEA 266 GO3 MOVE.L BP_AD3,BP_ADS3 00000594 23F9 0000FFDE 0000FFEE 267 MOVE.L BP_AD4,BP_ADS4 0000059E 268 ; Duplicate breakpoints wreak havoc when set. To avoid 0000059E 269 ; these problems RID_EQ nulls duplicate entries. 0000059E 6100 0062 270 BSR RID_EQ 000005A2 271 ; Now all breakpoints are in place. If a breakpoint 000005A2 272 ; address is 0 then it's not set. If not 0 then 000005A2 273 ; proceed to see if the address is the same as that 000005A2 274 ; at SAV_PC. If yes then execute 1 instruction and 000005A2 275 ; now proceed to set the breakpoint by saving its 000005A2 276 ; opcode and replacing it with TRAP #10. This is to 000005A2 277 ; be done but once. 000005A2 207C 0000FFE2 278 MOVEA.L #BP_ADS1,A0 ;A0 -> BP_ADS1 000005A8 227C 0000FFF2 279 MOVEA.L #OPCOD1,A1 ;A1 -> OPCOD1 000005AE 51C1 280 SF D1 ;succcesive instructions flag 000005B0 303C 0003 281 MOVE.W #3,D0 ;loop counter in D0.W 000005B4 4A90 282 GO4 TST.L (A0) 000005B6 6722 283 BEQ.S GO6 ;if bkpt addr is 0 then ignore 000005B8 2439 0000FFD0 284 MOVE.L SAV_PC,D2 ;Not 0, so compare bkpt 000005BE B490 285 CMP.L (A0),D2 ;addr. with user PC 000005C0 6610 286 BNE.S GO5 ;Go and set if not same 000005C2 4A01 287 TST.B D1 ;Is this the 1st occurrence? 000005C4 660C 288 BNE.S GO5 ;No, the go set it. 000005C6 48E7 80C0 289 MOVEM.L D0/A0-A1,-(A7) ;If bkpt = (SAV_PC) 000005CA 6120 290 BSR.S GOSKIP ;then skip one instruction 000005CC 4CDF 0301 291 MOVEM.L (A7)+,D0/A0-A1 000005D0 50C1 292 ST D1 ;Make sure this happens but once 000005D2 293 ; Okay, now finally set the breakpoints. 000005D2 2450 294 GO5 MOVEA.L (A0),A2 ;get bkpt addr 000005D4 3292 295 MOVE.W (A2),(A1) ;save and replace 000005D6 34BC 4E4A 296 MOVE.W #TRPTEN,(A2) ;its opcode 000005DA 297 ; Bump pointers to the next breakpoint 000005DA 41E8 0004 298 GO6 LEA 4(A0),A0 ;bump A0 000005DE 43E9 0002 299 LEA 2(A1),A1 ;bump A1 000005E2 51C8 FFD0 300 DBRA D0,GO4 000005E6 6100 05CA 301 BSR REGREST ;restore user regs 000005EA 4E73 302 RTE ;and go to user program 000005EC 303 ; 000005EC 304 ; This is the routine for doing a hidden 000005EC 305 ; trace tracing of a single line of code. 000005EC 50F9 0000FFFB 306 GOSKIP ST SKIPFLG ;set the flag 000005F2 51F9 0000FFFA 307 SF FP_FLG ;clear flag 000005F8 6100 05B8 308 BSR REGREST ;restore user regs 000005FC 007C 8000 309 ORI.W #$8000,SR ;enable tracing 00000600 4E73 310 RTE 00000602 311 ; 00000602 312 ; This routine nulls duplicate entries. 00000602 323C 0003 313 RID_EQ MOVE.W #3,D1 00000606 207C 0000FFE2 314 MOVEA.L #BP_ADS1,A0 ;point to 1st num 0000060C 3801 315 RID1 MOVE.W D1,D4 0000060E 43E8 0004 316 LEA 4(A0),A1 ;point to 2nd num 00000612 2410 317 RID2 MOVE.L (A0),D2 ;put it in D2 00000614 B491 318 CMP.L (A1),D2 00000616 6602 319 BNE.S RID3 ;skip if not equal 00000618 4291 320 CLR.L (A1) 0000061A 5889 321 RID3 ADDQ.L #4,A1 ;point to next enty 0000061C 5344 322 SUBQ.W #1,D4 ;decrement inner loop counter 0000061E 66F2 323 BNE.S RID2 00000620 5888 324 ADDQ.L #4,A0 ;point to next enty 00000622 5341 325 SUBQ.W #1,D1 00000624 66E6 326 BNE.S RID1 00000626 4E75 327 RTS 00000628 328 ; 00000628 329 ; This routine saves the user registers 00000628 330 ; after a TRAP #9 program termination, 00000628 331 ; prints the address at which the TRAP #9 00000628 332 ; instruction was found and puts back the 00000628 333 ; original opcodes at all breakpoints. 00000628 6100 055C 334 TRP_9 BSR REG_SAV 0000062C 267C 00002D04 335 MOVEA.L #MSG_NIN,A3 ;point to message 00000632 6100 025E 336 BSR PRTMSG 00000636 2439 0000FFD0 337 MOVE.L SAV_PC,D2 ;get user PC value 0000063C 5582 338 SUBQ.L #2,D2 ;adjust address 0000063E 6100 03D6 339 BSR PRT_SIX 00000642 6100 025E 340 BSR CRLF 00000646 6100 0030 341 BSR CLR_BK ;clear the bkpts 0000064A 6000 FDC0 342 BRA GET_CMD ;all done 0000064E 343 ; 0000064E 344 ; This TRAP #10 routine is executed when a 0000064E 345 ; breakpoint is encountered. It saves the 0000064E 346 ; registers and prints MSG_TEN. It then 0000064E 347 ; puts back the original opcodes at all 0000064E 348 ; breakpoints. 0000064E 6100 0536 349 TRP_10 BSR REG_SAV 00000652 267C 00002D25 350 MOVEA.L #MSG_TEN,A3 ;point to message 00000658 6100 0238 351 BSR PRTMSG 0000065C 2439 0000FFD0 352 MOVE.L SAV_PC,D2 ;get user PC value 00000662 5582 353 SUBQ.L #2,D2 ;adjust address 00000664 23C2 0000FFD0 354 MOVE.L D2,SAV_PC ;store adjusted PC 0000066A 6100 03AA 355 BSR PRT_SIX 0000066E 6100 0232 356 BSR CRLF 00000672 6104 357 BSR.S CLR_BK ;clear the bkpts 00000674 6000 FD96 358 BRA GET_CMD ;all done 00000678 359 ; 00000678 360 ; Removes any breakpoints that existed and 00000678 361 ; puts back the appropriate opcodes. 00000678 362 ; First remove bkpts set by GO command. 00000678 207C 0000FFE2 363 CLR_BK MOVEA.L #BP_ADS1,A0 ;A0 -> BP_AD1 0000067E 227C 0000FFF2 364 MOVEA.L #OPCOD1,A1 ;A1 -> OPCOD1 00000684 7003 365 MOVEQ #3,D0 ;loop 4 times 00000686 4A90 366 CLR_BK1 TST.L (A0) 00000688 6706 367 BEQ.S CLR_BK2 ;if 0 then ignore 0000068A 2450 368 MOVEA.L (A0),A2 ;get breakpoint addr 0000068C 3491 369 MOVE.W (A1),(A2) ;restore opcode 0000068E 4290 370 CLR.L (A0) 00000690 41E8 0004 371 CLR_BK2 LEA 4(A0),A0 ;bump A0 00000694 43E9 0002 372 LEA 2(A1),A1 ;bump A1 00000698 51C8 FFEC 373 DBRA D0,CLR_BK1 0000069C 4E75 374 RTS 0000069E 375 ; 0000069E 6100 041C 376 VERIFY BSR GETADR ;get start addr 000006A2 2242 377 MOVEA.L D2,A1 ;start addr in A1 000006A4 6100 0416 378 BSR GETADR ;get end addr 000006A8 2442 379 MOVEA.L D2,A2 ;end addr in A2 000006AA 528A 380 ADDQ.L #1,A2 ;Needed because using (A1)+ 000006AC 6100 040E 381 BSR GETADR ;get dest addr 000006B0 2642 382 MOVEA.L D2,A3 ;dest addr in A3 000006B2 B709 383 VERIF1 CMPM.B (A1)+,(A3)+ ;compare bytes 000006B4 660C 384 BNE.S FAIL 000006B6 B5C9 385 CMPA.L A1,A2 ;at end addr yet? 000006B8 66F8 386 BNE.S VERIF1 000006BA 47F9 00002D76 387 LEA PASSMSG,A3 ;POINT TO MESSAGE 000006C0 6006 388 BRA.S QUIT 000006C2 47F9 00002D91 389 FAIL LEA FAILMSG,A3 ;POINT TO MESSAGE 000006C8 6100 01C8 390 QUIT BSR PRTMSG 000006CC 6000 FD3E 391 BRA GET_CMD 000006D0 392 ; 000006D0 6100 03EA 393 MOOV BSR GETADR ;get start addr 000006D4 2242 394 MOVEA.L D2,A1 000006D6 6100 03E4 395 BSR GETADR ;get end addr 000006DA 2442 396 MOVEA.L D2,A2 000006DC 528A 397 ADDQ.L #1,A2 ;Needed because using (A1)+ 000006DE 6100 03DC 398 BSR GETADR ;get dest addr 000006E2 2642 399 MOVEA.L D2,A3 000006E4 16D9 400 MOOV1 MOVE.B (A1)+,(A3)+ ;move bytes 000006E6 B5C9 401 CMPA.L A1,A2 ;at end addr yet? 000006E8 66FA 402 BNE.S MOOV1 000006EA 6000 FD20 403 BRA GET_CMD 000006EE 404 ; 000006EE 405 ; Edit data on the screen 000006EE 6100 03CC 406 EDIT BSR GETADR ;get start address 000006F2 2442 407 MOVEA.L D2,A2 ;point A2 to memory 000006F4 6100 01AC 408 BSR CRLF ;new line please 000006F8 240A 409 NEW_DAT MOVE.L A2,D2 ;print data address 000006FA 6100 031A 410 BSR PRT_SIX 000006FE 6100 01B0 411 BSR SPACE 00000702 1412 412 MOVE.B (A2),D2 ;get the data stored 00000704 6100 02E6 413 BSR PRT_BYT ;and show it 00000708 123C 003F 414 MOVE.B #'?',D1 ;Print change prompt 0000070C 6100 0168 415 BSR CHAROUT 00000710 6100 035C 416 BSR GET_BYT ;get new data 00000714 4A02 417 TST.B D2 ;no change desired? 00000716 6702 418 BEQ.S ENTR_IT ;jump if new data 00000718 1212 419 MOVE.B (A2),D1 ;reget old data 0000071A 14C1 420 ENTR_IT MOVE.B D1,(A2)+ ;save data and bump 0000071C 61DA 421 BSR.S NEW_DAT ;pointer 0000071E 422 ; 0000071E 423 ; Display or modify register data as 0000071E 424 ; required. SEARCH left A6 pointing one 0000071E 425 ; beyond the CR or SP which follows the 0000071E 426 ; principal command character. 0000071E 427 ; Next line added in mon209 to set where to return 0000071E 13FC 0000 0000FF48 428 REGMOD MOVE.B #$00,REGTYP 00000726 0C2E 000D FFFF 429 CMPI.B #CR,-1(A6) ;is previous CR? 0000072C 6608 430 BNE.S REGMOD0 ;no, so skip 0000072E 6100 04A8 431 BSR REGPRT1 00000732 6000 FCD8 432 BRA GET_CMD 00000736 6100 0418 433 REGMOD0 BSR SKIPSP ;skip leading SPs 0000073A 121E 434 MOVE.B (A6)+,D1 ;get the next char 0000073C 6100 03AA 435 BSR UP_CASE 00000740 267C 0000FFB0 436 MOVEA.L #SAVREGS+32,A3 ;temporary 00000746 0C01 0041 437 CMPI.B #'A',D1 0000074A 6778 438 BEQ.S REGMOD1 ;A reg so jump 0000074C 267C 0000FF90 439 MOVEA.L #SAVREGS,A3 ;temporary 00000752 0C01 0044 440 CMPI.B #'D',D1 00000756 676C 441 BEQ.S REGMOD1 ;D reg so jump 00000758 267C 0000FFD0 442 MOVEA.L #SAV_PC,A3 ;temporary 0000075E 0C01 0050 443 CMPI.B #'P',D1 00000762 6600 00C8 444 BNE REGME 00000766 445 ; No command errors, so we modify the PC. 00000766 1801 446 MOVE.B D1,D4 ;will need 'P' later 00000768 121E 447 MOVE.B (A6)+,D1 ;get next char 0000076A 6100 037C 448 BSR UP_CASE 0000076E 0C01 0043 449 CMPI.B #'C',D1 ;is it 'C'? 00000772 6600 00B8 450 BNE REGME ;no,so quit 00000776 1601 451 MOVE.B D1,D3 ;will need 'C' later 00000778 121E 452 MOVE.B (A6)+,D1 ;get last char 0000077A 0C01 000D 453 CMPI.B #CR,D1 ;is it CR? 0000077E 6600 00AC 454 BNE REGME ;no,so quit 00000782 6100 011E 455 BSR CRLF ;passed all tests 00000786 1204 456 MOVE.B D4,D1 ;display the 'P' 00000788 6100 00EC 457 BSR CHAROUT 0000078C 1203 458 MOVE.B D3,D1 ;display the 'C' 0000078E 6100 00E6 459 BSR CHAROUT 00000792 123C 003A 460 MOVE.B #':',D1 ;also a ':' 00000796 6100 00DE 461 BSR CHAROUT 0000079A 6100 0114 462 BSR SPACE ;a ' ' looks good 0000079E 241B 463 MOVE.L (A3)+,D2 ;get the data in D2 000007A0 6100 026A 464 BSR PRT_LON ;display it 000007A4 6100 010A 465 BSR SPACE ;another ' ' 000007A8 123C 003F 466 MOVE.B #'?',D1 ;now a '?' 000007AC 6100 00C8 467 BSR CHAROUT 000007B0 6100 00FE 468 BSR SPACE ;one more ' ' 000007B4 6100 02F2 469 BSR GETADRT ;get new data in D2 000007B8 4A06 470 TST.B D6 ;check flag for CR 000007BA 6600 0062 471 BNE REGMQ ;was FF so quit it 000007BE 2702 472 MOVE.L D2,-(A3) ;save it 000007C0 6000 005C 473 BRA REGMQ ;done 000007C4 474 ;This portion modifies the A and D registers 000007C4 1801 475 REGMOD1 MOVE.B D1,D4 ;save the A or D 000007C6 121E 476 MOVE.B (A6)+,D1 ;get register # 000007C8 0C01 0030 477 CMPI.B #'0',D1 ;within bounds? 000007CC 6B5E 478 BMI.S REGME ;< than, no good 000007CE 0C01 0037 479 CMPI.B #'7',D1 000007D2 6E58 480 BGT.S REGME ;> than, no good 000007D4 1601 481 MOVE.B D1,D3 ;will need # later 000007D6 121E 482 MOVE.B (A6)+,D1 ;get last char 000007D8 0C01 000D 483 CMPI.B #CR,D1 ;is it CR? 000007DC 664E 484 BNE.S REGME ;no, so quit 000007DE 1203 485 MOVE.B D3,D1 ;find displacement 000007E0 0281 0000000F 486 ANDI.L #$F,D1 ;remove ASCII bias 000007E6 E581 487 ASL.L #2,D1 ;multiply by 4 000007E8 D7C1 488 ADDA.L D1,A3 ;A3 points correctly 000007EA 1204 489 MOVE.B D4,D1 ;display 'A' or 'D' 000007EC 6100 0088 490 BSR CHAROUT 000007F0 1203 491 MOVE.B D3,D1 ;display the # 000007F2 6100 0082 492 BSR CHAROUT 000007F6 123C 003A 493 MOVE.B #':',D1 ;also a ':' 000007FA 617A 494 BSR.S CHAROUT 000007FC 6100 00B2 495 BSR SPACE ;a ' ' looks good 00000800 241B 496 MOVE.L (A3)+,D2 ;get the data in D2 00000802 6100 0208 497 BSR PRT_LON ;display it 00000806 6100 00A8 498 BSR SPACE ;another ' ' 0000080A 123C 003F 499 MOVE.B #'?',D1 ;now a '?' 0000080E 6166 500 BSR.S CHAROUT 00000810 6100 009E 501 BSR SPACE ;one more ' ' 00000814 6100 0292 502 BSR GETADRT ;get new data in D2 00000818 4A06 503 TST.B D6 ;check flag for CR 0000081A 6602 504 BNE.S REGMQ ;was FF so quit it 0000081C 2702 505 MOVE.L D2,-(A3) ;save it 0000081E 506 ; 0000081E 507 ; Added in mon209 to exit from different regmod types 0000081E 0C39 00FF 0000FF48 508 REGMQ CMPI.B #$FF,REGTYP 00000826 6600 FBE4 509 BNE GET_CMD 0000082A 4E75 510 RTS 0000082C 511 ; 0000082C 0C39 00FF 0000FF48 512 REGME CMPI.B #$FF,REGTYP 00000834 6600 0204 513 BNE CMDERR 00000838 4E75 514 RTS 0000083A 515 ; 0000083A 207C 00010001 516 SERINI MOVEA.L #CSREG,A0 00000840 10BC 00AA 517 MOVE.B #$AA,(A0) 00000844 10BC 0040 518 MOVE.B #$40,(A0) 00000848 10BC 004E 519 MOVE.B #$4E,(A0) ;$CE for 2 stops 0000084C 10BC 0027 520 MOVE.B #$27,(A0) 00000850 4E75 521 RTS 00000852 522 ; 00000852 523 ; Returns Z-flag = 0 if no char. 00000852 48E7 8000 524 INSTAT MOVEM.L D0,-(A7) 00000856 1039 00010001 525 MOVE.B CSREG,D0 ;get status 0000085C 0200 0002 526 ANDI.B #DAVBIT,D0 ;mask 00000860 4CDF 0001 527 MOVEM.L (A7)+,D0 ;Movem affects no flags 00000864 4E75 528 RTS 00000866 529 ; 00000866 530 ; Returns 7-bit char in D1.B 00000866 61EA 531 CHARIN BSR.S INSTAT ;get status 00000868 67FC 532 BEQ.S CHARIN ;no char so loop 0000086A 1239 00010000 533 MOVE.B DREG,D1 ;get char 00000870 0201 007F 534 ANDI.B #$7F,D1 ;reset bit 7 00000874 4E75 535 RTS 00000876 536 ; 00000876 537 ; Sends out char in D1.B 00000876 48E7 8000 538 CHAROUT MOVEM.L D0,-(A7) 0000087A 1039 00010001 539 MOVE.B CSREG,D0 ;get status 00000880 0200 0001 540 ANDI.B #BFEBIT,D0 ;is buffer empty? 00000884 4CDF 0001 541 MOVEM.L (A7)+,D0 ;Movem affects no flags 00000888 67EC 542 BEQ.S CHAROUT ;no, so loop 0000088A 13C1 00010000 543 MOVE.B D1,DREG ;buffer's empty, send 00000890 4E75 544 RTS 00000892 545 ; 00000892 546 ; This routine prints a message pointed to 00000892 547 ; by A3. The message must end in a NULL. 00000892 121B 548 PRTMSG MOVE.B (A3)+,D1 ;get a char 00000894 6704 549 BEQ.S PRTMEX ;quit on 0 00000896 61DE 550 BSR.S CHAROUT ;display the char 00000898 60F8 551 BRA.S PRTMSG ;do it again 0000089A 4E75 552 PRTMEX RTS 0000089C 553 ; 0000089C 554 ; Inputs and echoes a character 0000089C 61C8 555 CHARIO BSR.S CHARIN 0000089E 61D6 556 BSR.S CHAROUT 000008A0 4E75 557 RTS 000008A2 558 ; 000008A2 559 ; Send out CR and LF 000008A2 123C 000D 560 CRLF MOVE.B #CR,D1 ;send ASCII CR 000008A6 61CE 561 BSR.S CHAROUT 000008A8 123C 000A 562 MOVE.B #LF,D1 ;send ASCII LF 000008AC 61C8 563 BSR.S CHAROUT 000008AE 4E75 564 RTS 000008B0 565 ; 000008B0 566 ; Send out a SP 000008B0 123C 0020 567 SPACE MOVE.B #' ',D1 ;send ASCII SP 000008B4 61C0 568 BSR.S CHAROUT 000008B6 4E75 569 RTS 000008B8 570 ; 000008B8 571 ; Send two spaces to the screen 000008B8 61F6 572 TWO_SP BSR.S SPACE 000008BA 61F4 573 BSR.S SPACE 000008BC 4E75 574 RTS 000008BE 575 ; *************************************** 000008BE 576 ; The TRAP #15 routines below were added 000008BE 577 ; to make the SBC capable of ececuting 000008BE 578 ; the EASy68K tasks 0-2, 4-7, 9 and 000008BE 579 ; 12-14. 000008BE 580 ; *************************************** 000008BE 581 ;Implementation of the EASy68K trap #15 tasks. 000008BE 582 trp_15 000008BE 583 ; Task #0. Displays string at (A1), D1.W long, with CR, LF. 000008BE 4A00 584 tst.b d0 000008C0 6758 585 beq.s task0 000008C2 586 ; Task #1. Displays string at (A1), D1.W long, without CR, LF. 000008C2 0C00 0001 587 cmpi.b #1,d0 000008C6 6758 588 beq.s task1 000008C8 589 ; Task #2. Read, and echo, string from KBD and store at (A1). 000008C8 590 ; Length returned in D1.W (max 80). 000008C8 0C00 0002 591 cmpi.b #2,d0 000008CC 6764 592 beq.s task2 000008CE 593 ; Task #4. It converts a typed decimal string into a HEX 000008CE 594 ; number in D1.L. Max DEC number is 655,359. Input is 000008CE 595 ; terminated with . 000008CE 0C00 0004 596 cmpi.b #4,d0 000008D2 6700 0092 597 beq task4 000008D6 598 ; Task #5. Get a KBD char into D1.B. If ECHOFLG is 000008D6 599 ; set then echo char to screen. 000008D6 0C00 0005 600 cmpi.b #5,d0 000008DA 6700 00B8 601 beq task5 000008DE 602 ; Task #6. Send the char in D1.B to the screen. 000008DE 0C00 0006 603 cmpi.b #6,d0 000008E2 6700 00C2 604 beq task6 000008E6 605 ; Task #7. Get KBD status in D1.B. 1 if key was pressed, 0 if not. 000008E6 0C00 0007 606 cmpi.b #7,d0 000008EA 6700 00C0 607 beq task7 000008EE 608 ; Task #9. Make a graceful exit using the old TRAP #9 feature. 000008EE 0C00 0009 609 cmpi.b #9,d0 000008F2 6700 FD34 610 beq trp_9 000008F6 611 ; Task #12. If D1.B is zero then clear the ECHOFLG, else set it. 000008F6 0C00 000C 612 cmpi.b #12,d0 000008FA 6700 00BE 613 beq task12 000008FE 614 ; Task #13. Print on screen the NULL terminated string pointed 000008FE 615 ; to by A1, followed by CR, LF. 000008FE 0C00 000D 616 cmpi.b #13,d0 00000902 6700 00C8 617 beq task13 00000906 618 ; Task #14. Print on screen the NULL terminated string pointed 00000906 619 ; to by A1 without CR, LF. 00000906 0C00 000E 620 cmpi.b #14,d0 0000090A 6700 00CC 621 beq task14 0000090E 622 ; If none of the above then send message and terminate the program. 0000090E 47F9 00002DCF 623 lea uimpmsg,a3 00000914 4E43 624 trap #3 00000916 6000 FD10 625 bra trp_9 0000091A 626 ; Implementation of the task #0. Displays string at (A1), D1.W long, 0000091A 627 ; with CR, LF. 0000091A 6108 628 task0 bsr.s prtstr 0000091C 6184 629 bsr.s crlf 0000091E 4E73 630 rte 00000920 631 ; 00000920 632 ; Implementation of the task #1. Displays string at (A1), D1.W long, 00000920 633 ; without CR, LF. 00000920 6102 634 task1 bsr.s prtstr 00000922 4E73 635 rte 00000924 636 ; 00000924 3E01 637 prtstr move.w d1,d7 ;D7.W is the loop counter 00000926 1219 638 prtstr1 move.b (a1)+,d1 00000928 6100 FF4C 639 bsr charout ;print it 0000092C 5347 640 subq.w #1,d7 0000092E 66F6 641 bne.s prtstr1 00000930 4E75 642 rts 00000932 643 ; 00000932 644 ; Implementation of the task #2. Read, and echo, string from KBD and 00000932 645 ; store at (A1). Length returned in D1.W (max $FFFF). BS is implemented. 00000932 646 ; Process teminated with . Screen gets a CR, LF at end of input. 00000932 4247 647 task2 clr.w d7 ;temporary char counter 00000934 6100 FF30 648 task2a bsr charin ;get a char 00000938 0C01 000D 649 cmpi.b #cr,d1 ;if CR then done 0000093C 6720 650 beq.s task2ex 0000093E 0C01 0008 651 cmpi.b #bs,d1 00000942 670A 652 beq.s task2bs 00000944 6100 FF30 653 bsr charout ;echo it 00000948 12C1 654 move.b d1,(a1)+ ;store it 0000094A 5247 655 addq.w #1,d7 ;add to count 0000094C 60E6 656 bra.s task2a ;go back for more 0000094E 5307 657 task2bs subq.b #1,d7 ;adjust count 00000950 5389 658 subq.l #1,a1 ;adjust pointer 00000952 267C 00002CFC 659 movea.l #bsspbs,a3 ;fix up screen 00000958 6100 FF38 660 bsr prtmsg 0000095C 60D6 661 bra.s task2a 0000095E 6100 FF42 662 task2ex bsr crlf 00000962 3207 663 move.w d7,d1 00000964 4E73 664 rte 00000966 665 ; 00000966 666 ; Implementation of the task #4. It converts a typed decimal 00000966 667 ; string into a HEX ; number in D1.L. Max DEC number is 655,359. 00000966 668 ; Input is terminated with . If a non-decimal char is typed 00000966 669 ; then it is discarded and cleared off the screen. 00000966 4287 670 task4 clr.l d7 00000968 6100 FEFC 671 task4a bsr charin 0000096C 0C01 000D 672 cmpi.b #cr,d1 00000970 671E 673 beq.s task4ex 00000972 0C01 0039 674 cmpi.b #'9',d1 00000976 62F0 675 bhi.s task4a ;If >9 then get another 00000978 0C01 0030 676 cmpi.b #'0',d1 0000097C 6DEA 677 blt.s task4a ;If <0 then get another 0000097E 6100 FEF6 678 bsr charout ;It's good so echo it 00000982 0281 0000000F 679 andi.l #$f,d1 ;strip ASCII bias and clear upper part 00000988 CEFC 000A 680 mulu #10,d7 0000098C DE81 681 add.l d1,d7 0000098E 60D8 682 bra task4a 00000990 2207 683 task4ex move.l d7,d1 00000992 4E73 684 rte 00000994 685 ; 00000994 686 ; Implementation of the task #5 feature. It gets a KBD char 00000994 687 ; into D1.B. If ECHOFLG is set then it echos char to screen. 00000994 6100 FED0 688 task5 bsr charin ;get KBD char into D1.B. 00000998 4A39 0000FFFD 689 tst.b echoflg 0000099E 6704 690 beq.s task5ex 000009A0 6100 FED4 691 bsr charout 000009A4 4E73 692 task5ex rte 000009A6 693 ; 000009A6 694 ; Implementation of the task #6 feature. Sends a char in D1.B 000009A6 695 ; to the screen. 000009A6 6100 FECE 696 task6 bsr charout 000009AA 4E73 697 rte 000009AC 698 ; 000009AC 699 ; Task #7 implementation. Get KBD status in D1.B. 000009AC 700 ; 1 if key was pressed, 0 if not. 000009AC 4201 701 task7 clr.b d1 000009AE 6100 FEA2 702 bsr instat 000009B2 6704 703 beq.s task7ex 000009B4 123C 0001 704 move.b #1,d1 000009B8 4E73 705 task7ex rte 000009BA 706 000009BA 707 ; Task #12 implementation. If D1.B is zero then clear the 000009BA 708 ; ECHOFLG, else set it. 000009BA 4239 0000FFFD 709 task12 clr.b echoflg 000009C0 4A01 710 tst.b d1 000009C2 6706 711 beq.s tsk12ex 000009C4 50F9 0000FFFD 712 st.b echoflg 000009CA 4E73 713 tsk12ex rte 000009CC 714 ; 000009CC 715 ; Task #13 implementation. Print on screen the NULL terminated 000009CC 716 ; string pointed to by A1, followed by a CR, LF 000009CC 2649 717 task13 movea.l a1,a3 000009CE 6100 FEC2 718 bsr prtmsg 000009D2 6100 FECE 719 bsr crlf 000009D6 4E73 720 rte 000009D8 721 ; 000009D8 722 ; Task #14 implementation. Print on screen the NULL terminated 000009D8 723 ; string pointed to by A1 without a CR, LF. 000009D8 2649 724 task14 movea.l a1,a3 000009DA 6100 FEB6 725 bsr prtmsg 000009DE 4E73 726 rte 000009E0 727 ; *************************************** 000009E0 728 000009E0 729 ; Prints sign-on message 000009E0 267C 00002C29 730 SIGN_ON MOVEA.L #HELLO,A3 ;point to 'HELLO' 000009E6 6100 FEAA 731 BSR PRTMSG ;send it out 000009EA 4E75 732 RTS 000009EC 733 ; 000009EC 734 ; Takes a byte in D2.B, converts to 2 000009EC 735 ; ASCII characters and puts them on screen. 000009EC 2202 736 PRT_BYT MOVE.L D2,D1 ;init conversion reg 000009EE E919 737 ROL.B #4,D1 ;do upper nibble first 000009F0 6100 006A 738 BSR NUM_ASC ;convert to ASCII 000009F4 6100 FE80 739 BSR CHAROUT 000009F8 2202 740 MOVE.L D2,D1 ;now do lower nibble 000009FA 6160 741 BSR.S NUM_ASC 000009FC 6100 FE78 742 BSR CHAROUT ;send character 00000A00 4E75 743 RTS 00000A02 744 ; 00000A02 745 ; Takes a word in D2.W, converts to 4 00000A02 746 ; ASCII characters and puts them on screen. 00000A02 E15A 747 PRT_WRD ROL.W #8,D2 ;swap bytes in word 00000A04 61E6 748 BSR.S PRT_BYT ;output MSB 00000A06 E15A 749 ROL.W #8,D2 ;reswap bytes 00000A08 61E2 750 BSR.S PRT_BYT ;output LSB 00000A0A 4E75 751 RTS 00000A0C 752 ; 00000A0C 753 ; Takes a long word in D2.L, converts to 8 00000A0C 754 ; ASCII characters and puts them on screen. 00000A0C 4842 755 PRT_LON SWAP D2 ;get upper 16 bits 00000A0E 61F2 756 BSR.S PRT_WRD ;convert 4 chars 00000A10 4842 757 SWAP D2 ;get lower 16 bits 00000A12 61EE 758 BSR.S PRT_WRD 00000A14 4E75 759 RTS 00000A16 760 ; 00000A16 761 ; Takes a long word in D2.L, and prints the 00000A16 762 ; least significand 6 ASCII on the screen. 00000A16 4842 763 PRT_SIX SWAP D2 ;get upper 16 bits 00000A18 61D2 764 BSR.S PRT_BYT ;convert 4 chars 00000A1A 4842 765 SWAP D2 ;get lower 16 bits 00000A1C 61E4 766 BSR.S PRT_WRD 00000A1E 4E75 767 RTS 00000A20 768 ; 00000A20 769 ; Checks to see if D1.B contains a valid HEX 00000A20 770 ; digit. 00000A20 0C01 0046 771 VALDIG CMPI.B #'F',D1 ;char > 'F' ? 00000A24 6E1E 772 BGT.S DATAERR ;yes, so alert 00000A26 0C01 0030 773 CMPI.B #'0',D1 ;char < '0' ? 00000A2A 6D18 774 BLT.S DATAERR ;yes, so alert 00000A2C 0C01 0039 775 CMPI.B #'9',D1 ;char < = '9'? 00000A30 6F06 776 BLE.S VALDIGE ;'0' < char < '9' 00000A32 0C01 0041 777 CMPI.B #'A',D1 ;char < 'A'? 00000A36 6D0C 778 BLT.S DATAERR ;yes, so alert 00000A38 4E75 779 VALDIGE RTS ;'A' < char < 'F' 00000A3A 780 ; 00000A3A 781 ; Prints out the message "Bad Command" 00000A3A 782 ; then looks for another command. 00000A3A 267C 00002BFF 783 CMDERR MOVEA.L #BADCMD,A3 ;point to message 00000A40 6000 154E 784 BRA REPORT ;restart monitor 00000A44 785 ; 00000A44 786 ; Prints out the message "Invalid address 00000A44 787 ; or hex data." Then it restarts monitor. 00000A44 267C 00002C0C 788 DATAERR MOVEA.L #INVDATA,A3 ;point to message 00000A4A 6000 1544 789 BRA REPORT ;restart monitor 00000A4E 790 ; 00000A4E 791 ; Converts legit ASCII #s to BCD. 00000A4E 0401 0030 792 ASC_BCD SUBI.B #$30,D1 ;remove ASCII bias 00000A52 0C01 000A 793 CMPI.B #10,D1 ;0-9? 00000A56 6B02 794 BMI.S ASC_BX ;Yes, so job's done 00000A58 5F01 795 SUBQ.B #7,D1 ;remove alpha bias 00000A5A 4E75 796 ASC_BX RTS 00000A5C 797 ; 00000A5C 798 ; Convert HEX digit in D1.B to ASCII 00000A5C 0201 000F 799 NUM_ASC ANDI.B #$F,D1 ;reset upper nibble 00000A60 0601 0030 800 ADDI.B #$30,D1 ;add ASCII bias 00000A64 0C01 003A 801 CMPI.B #$3A,D1 ;test if > '9' 00000A68 6B02 802 BMI.S NUM_EX ;< '9' so done 00000A6A 5E01 803 ADDQ.B #7,D1 ;> '9', so add 7 00000A6C 4E75 804 NUM_EX RTS 00000A6E 805 ; 00000A6E 806 ; It first fills INPBUF with chars until a 00000A6E 807 ; CR occurs. The chars are then examined. 00000A6E 808 ; If 1st char is CR then it sets D2.B and 00000A6E 809 ; quits. Else it resets D2.B and proceeds to 00000A6E 810 ; change valid hex digits to ASCII numbers. 00000A6E 811 ; This routine is only used by EDIT. 00000A6E 6100 008A 812 GET_BYT BSR GETLIN ;get chars from kbd 00000A72 2C7C 0000FF70 813 MOVEA.L #INPBUF,A6 ;reset A6 00000A78 6100 00D6 814 GETB1 BSR SKIPSP ;get rid if spaces 00000A7C 121E 815 MOVE.B (A6)+,D1 ;get first char 00000A7E 50C2 816 ST D2 ;set D2.B for now 00000A80 6166 817 BSR.S UP_CASE ;convert to UC 00000A82 0C01 000D 818 CMPI.B #CR,D1 ;test for CR 00000A86 671E 819 BEQ.S GETBX ;if CR, no change 00000A88 6196 820 BSR.S VALDIG ;valid digit? 00000A8A 61C2 821 BSR.S ASC_BCD ;convert into hex 00000A8C 1401 822 MOVE.B D1,D2 ;save 1st digit 00000A8E 121E 823 MOVE.B (A6)+,D1 ;get second digit 00000A90 6156 824 BSR.S UP_CASE 00000A92 0C01 000D 825 CMPI.B #CR,D1 ;test for CR 00000A96 6604 826 BNE.S GETB2 ;not CR, so process 00000A98 1202 827 MOVE.B D2,D1 ;reget 1st digit 00000A9A 6008 828 BRA.S GETB3 ;and get out 00000A9C 6182 829 GETB2 BSR.S VALDIG ;valid digit? 00000A9E 61AE 830 BSR.S ASC_BCD ;convert into hex 00000AA0 E91A 831 ROL.B #4,D2 ;move first digit 00000AA2 D202 832 ADD.B D2,D1 ;form final result 00000AA4 51C2 833 GETB3 SF D2 ;signal change 00000AA6 4E75 834 GETBX RTS 00000AA8 835 ; 00000AA8 836 ; Gets keyboard input and transforms it into 00000AA8 837 ; a longword into D2. If only a CR was typed 00000AA8 838 ; then D6.B contains $FF, else it's 0. 00000AA8 6100 0050 839 GETADRT BSR GETLIN ;fill buffer 00000AAC 2C7C 0000FF70 840 MOVEA.L #INPBUF,A6 ;repoint A6 00000AB2 50C6 841 ST D6 ;set flag in D6.B 00000AB4 0C16 000D 842 CMPI.B #CR,(A6) ;check 1st char 00000AB8 672C 843 BEQ.S EX_ADR ;if it's CR then exit 00000ABA 51C6 844 SF D6 ;not CR, so reset D6.B 00000ABC 6100 0092 845 GETADR BSR SKIPSP ;skip over SPs 00000AC0 4281 846 CLR.L D1 ;init temp register 00000AC2 4282 847 CLR.L D2 ;init result register 00000AC4 121E 848 NEXTCHR MOVE.B (A6)+,D1 ;get a char 00000AC6 6120 849 BSR.S UP_CASE 00000AC8 0C01 000D 850 CMPI.B #CR,D1 ;exit if CR 00000ACC 6718 851 BEQ.S EX_ADR 00000ACE 0C01 0020 852 CMPI.B #' ',D1 ;exit if SP 00000AD2 6712 853 BEQ.S EX_ADR 00000AD4 6100 FF4A 854 BSR VALDIG ;valid digit? 00000AD8 6100 FF74 855 BSR ASC_BCD ;convert it to hex 00000ADC E99A 856 ROL.L #4,D2 ;next digit in D2 00000ADE 0202 00F0 857 ANDI.B #$F0,D2 00000AE2 D401 858 ADD.B D1,D2 ;insert new digit 00000AE4 60DE 859 BRA.S NEXTCHR ;and continue 00000AE6 4E75 860 EX_ADR RTS 00000AE8 861 ; 00000AE8 862 ; Changes chars in the range 'a'=buffer 00000B3E 5206 898 ADDQ.B #1,D6 ;update char count 00000B40 6100 FD34 899 BSR CHAROUT ;echo the char 00000B44 60C0 900 BRA.S GETCHAR ;get another char 00000B46 1C81 901 GETCHX MOVE.B D1,(A6) ;Place CR in buffer 00000B48 5206 902 ADDQ.B #1,D6 ;and count it 00000B4A 6100 FD56 903 BSR CRLF ;send a CR & LF 00000B4E 4E75 904 RTS 00000B50 905 ; 00000B50 906 ; If not SP do nothing. If SP increment 00000B50 907 ; pointer A6 by one. 00000B50 0C16 0020 908 SKIPSP CMPI.B #' ',(A6) 00000B54 6604 909 BNE.S SKIPSPE 00000B56 528E 910 ADDQ.L #1,A6 00000B58 60F6 911 BRA.S SKIPSP 00000B5A 4E75 912 SKIPSPE RTS 00000B5C 913 ; 00000B5C 914 ; Initializes the user registers to zeros. 00000B5C 227C 0000FF90 915 NULLREG MOVEA.L #SAVREGS,A1 00000B62 247C 00010000 916 MOVEA.L #ENDRAM,A2 00000B68 4219 917 NULLR1 CLR.B (A1)+ ;clear them 00000B6A B5C9 918 CMPA.L A1,A2 ;done yet? 00000B6C 66FA 919 BNE.S NULLR1 00000B6E 23FC 0000FEB0 0000FFCC 920 MOVE.L #USTCK,SAV_A7 00000B78 42B9 0000FF3A 921 CLR.L UNADR 00000B7E 50F9 0000FFFD 922 ST.B ECHOFLG 00000B84 4E75 923 RTS 00000B86 924 ; 00000B86 925 ; This routine saves the registers of the 00000B86 926 ; executed program for future display and 00000B86 927 ; future restoration. 00000B86 48F9 7FFF 0000FF90 928 REG_SAV MOVEM.L D0-D7/A0-A6,SAVREGS ;d0-a6 00000B8E 201F 929 MOVE.L (A7)+,D0 ;pop ret address 00000B90 33DF 0000FFD4 930 MOVE.W (A7)+,SAV_SR ;pop SR 00000B96 23F9 0000FFD0 0000FF36 931 MOVE.L SAV_PC,OLD_PC 00000BA0 23DF 0000FFD0 932 MOVE.L (A7)+,SAV_PC ;pop PC 00000BA6 2F00 933 MOVE.L D0,-(A7) ;repush ret addr 00000BA8 4E6D 934 MOVE.L USP,A5 ;get user's A7 00000BAA 23CD 0000FFCC 935 MOVE.L A5,SAV_A7 ;save it 00000BB0 4E75 936 RTS 00000BB2 937 ; 00000BB2 938 ; This routine restores the registers of a 00000BB2 939 ; program whose execution terminates with 00000BB2 940 ; either a trap #9 or some other trap put 00000BB2 941 ; in place to breakpoint a program. Transfer 00000BB2 942 ; to the user program is then accomplished 00000BB2 943 ; with an RTE instruction. 00000BB2 201F 944 REGREST MOVE.L (A7)+,D0 ;pop ret address 00000BB4 2A79 0000FFCC 945 MOVEA.L SAV_A7,A5 ;get user's A7 00000BBA 4E65 946 MOVE.L A5,USP ;restore it 00000BBC 2F39 0000FFD0 947 MOVE.L SAV_PC,-(A7) ;push PC 00000BC2 3F39 0000FFD4 948 MOVE.W SAV_SR,-(A7) ;push SR 00000BC8 2F00 949 MOVE.L D0,-(A7) ;repush ret addr 00000BCA 4CF9 7FFF 0000FF90 950 MOVEM.L SAVREGS,D0-D7/A0-A6 ;d0-a6 00000BD2 4E75 951 RTS 00000BD4 952 ; 00000BD4 953 ; This routine will diplay the register 00000BD4 954 ; information saved by REG_SAV. 00000BD4 6100 0020 955 REG_PRT BSR PRTOLD ;Old PC with disassembly 00000BD8 207C 0000FF90 956 REGPRT1 MOVEA.L #SAVREGS,A0 ;A0 -> reg. data 00000BDE 1E3C 0044 957 MOVE.B #'D',D7 ;print the D regs 00000BE2 6100 009A 958 BSR REGDISP 00000BE6 1E3C 0041 959 MOVE.B #'A',D7 ;print the A regs 00000BEA 6100 0092 960 BSR REGDISP 00000BEE 6156 961 BSR.S PRTNEW 00000BF0 6100 00C8 962 BSR PRTSR 00000BF4 4E75 963 RTS 00000BF6 964 ; 00000BF6 965 ; Disassebly and display of the OPCODE at OLD_PC. 00000BF6 2A79 0000FF36 966 PRTOLD MOVEA.L OLD_PC,A5 ;Disassem address in A5 00000BFC 6100 0572 967 BSR UNASMB ;call unasm core routine 00000C00 240D 968 MOVE.L A5,D2 ;move instruction address 00000C02 6100 FE12 969 BSR PRT_SIX 00000C06 6100 FCB0 970 BSR TWO_SP 00000C0A 4283 971 CLR.L D3 ;blank spaces counter (BSC) 00000C0C 341D 972 PRTOLD1 MOVE.W (A5)+,D2 ;get word 00000C0E 6100 FDF2 973 BSR PRT_WRD ;print word of hex code 00000C12 6100 FC9C 974 BSR SPACE ;space 00000C16 5403 975 ADDQ.B #2,D3 ;add 2 bytes to BSC 00000C18 5506 976 SUBQ.B #2,D6 ;reduce length counter by 2 00000C1A 66F0 977 BNE.S PRTOLD1 ;if more bytes print again 00000C1C 0C03 000A 978 PRTOLD2 CMPI.B #10,D3 ;is the string 10 bytes 00000C20 6C10 979 BGE.S PRTOLD3 00000C22 6100 FC94 980 BSR TWO_SP 00000C26 6100 FC90 981 BSR TWO_SP 00000C2A 6100 FC84 982 BSR SPACE 00000C2E 5403 983 ADDQ.B #2,D3 00000C30 60EA 984 BRA.S PRTOLD2 00000C32 6100 FC7C 985 PRTOLD3 BSR SPACE 00000C36 267C 0000FF3E 986 MOVEA.L #UASMCMD,A3 ;point A3 to unasm cmd buff 00000C3C 6100 FC54 987 BSR PRTMSG ;display commant text 00000C40 6100 FC60 988 BSR CRLF 00000C44 4E75 989 RTS 00000C46 990 ; 00000C46 991 ; Next PC is printed and disassembled. 00000C46 267C 00002DBF 992 PRTNEW MOVEA.L #PC_MSG,A3 00000C4C 6100 FC44 993 BSR PRTMSG 00000C50 2439 0000FFD0 994 MOVE.L SAV_PC,D2 ;get the register 00000C56 6100 FDBE 995 BSR PRT_SIX 00000C5A 267C 00002DA8 996 MOVEA.L #SP24MSG,A3 00000C60 6100 FC30 997 BSR PRTMSG 00000C64 2A79 0000FFD0 998 MOVEA.L SAV_PC,A5 00000C6A 6100 0504 999 BSR UNASMB 00000C6E 267C 0000FF3E 1000 MOVEA.L #UASMCMD,A3 ;A3 -> to unasm cmd buffer 00000C74 6100 FC1C 1001 BSR PRTMSG ;display command text 00000C78 6100 FC28 1002 BSR CRLF 00000C7C 4E75 1003 RTS 00000C7E 1004 ; 00000C7E 1A3C 0030 1005 REGDISP MOVE.B #'0',D5 ;register # in here 00000C82 1207 1006 REGD1 MOVE.B D7,D1 ;print reg letter 00000C84 6100 FBF0 1007 BSR CHAROUT 00000C88 1205 1008 MOVE.B D5,D1 ;print reg number 00000C8A 6100 FBEA 1009 BSR CHAROUT 00000C8E 6100 00D6 1010 BSR COL_SP ;print :, space 00000C92 2418 1011 MOVE.L (A0)+,D2 ;print the register 00000C94 6100 FD76 1012 BSR PRT_LON 00000C98 6100 FC1E 1013 BSR TWO_SP ;print 2 spaces 00000C9C 6100 FC12 1014 BSR SPACE 00000CA0 5205 1015 ADDQ.B #1,D5 00000CA2 0C05 0038 1016 CMPI.B #'8',D5 ; D5 = '8' yet? 00000CA6 670C 1017 BEQ.S REGDFIN ; if yes then exit 00000CA8 0C05 0034 1018 CMPI.B #'4',D5 ; D5 = '4' yet? 00000CAC 66D4 1019 BNE.S REGD1 ; no, then next reg 00000CAE 6100 FBF2 1020 BSR CRLF ; D5 = '4' send CRLF 00000CB2 60CE 1021 BRA.S REGD1 ; and do next reg 00000CB4 6100 FBEC 1022 REGDFIN BSR CRLF 00000CB8 4E75 1023 RTS 00000CBA 1024 ; 00000CBA 1025 ; Print the USR 00000CBA 267C 00002DC6 1026 PRTSR MOVEA.L #SR_MSG,A3 00000CC0 6100 FBD0 1027 BSR PRTMSG 00000CC4 3439 0000FFD4 1028 MOVE.W SAV_SR,D2 00000CCA 3802 1029 MOVE.W D2,D4 ;copy SR to D4 00000CCC 6100 FD34 1030 BSR PRT_WRD ;print the register 00000CD0 6100 FBE6 1031 BSR TWO_SP ;print 2 spaces 00000CD4 1032 ; Print "Flags: X = " and X flag 00000CD4 267C 00002531 1033 MOVEA.L #MESGFLG,A3 00000CDA 6100 FBB6 1034 BSR PRTMSG 00000CDE 123C 0031 1035 MOVE.B #'1',D1 00000CE2 0804 0004 1036 BTST #4,D4 00000CE6 6604 1037 BNE.S REGETC1 00000CE8 123C 0030 1038 MOVE.B #'0',D1 00000CEC 6100 FB88 1039 REGETC1 BSR CHAROUT 00000CF0 1040 ;Print ", N = " and N flag 00000CF0 267C 0000253E 1041 MOVEA.L #MESGN,A3 00000CF6 6100 FB9A 1042 BSR PRTMSG 00000CFA 123C 0031 1043 MOVE.B #'1',D1 00000CFE 0804 0003 1044 BTST #3,D4 00000D02 6604 1045 BNE.S REGETC2 00000D04 123C 0030 1046 MOVE.B #'0',D1 00000D08 6100 FB6C 1047 REGETC2 BSR CHAROUT 00000D0C 1048 ;Print ", Z = " and Z flag 00000D0C 267C 00002545 1049 MOVEA.L #MESGZ,A3 00000D12 6100 FB7E 1050 BSR PRTMSG 00000D16 123C 0031 1051 MOVE.B #'1',D1 00000D1A 0804 0002 1052 BTST #2,D4 00000D1E 6604 1053 BNE.S REGETC3 00000D20 123C 0030 1054 MOVE.B #'0',D1 00000D24 6100 FB50 1055 REGETC3 BSR CHAROUT 00000D28 1056 ;Print ", V = " and V flag 00000D28 267C 0000254C 1057 MOVEA.L #MESGV,A3 00000D2E 6100 FB62 1058 BSR PRTMSG 00000D32 123C 0031 1059 MOVE.B #'1',D1 00000D36 0804 0001 1060 BTST #1,D4 00000D3A 6604 1061 BNE.S REGETC4 00000D3C 123C 0030 1062 MOVE.B #'0',D1 00000D40 6100 FB34 1063 REGETC4 BSR CHAROUT 00000D44 1064 ;Print " C = " and C flag 00000D44 267C 00002553 1065 MOVEA.L #MESGC,A3 00000D4A 6100 FB46 1066 BSR PRTMSG 00000D4E 123C 0031 1067 MOVE.B #'1',D1 00000D52 0804 0000 1068 BTST #0,D4 00000D56 6604 1069 BNE.S REGETC5 00000D58 123C 0030 1070 MOVE.B #'0',D1 00000D5C 6100 FB18 1071 REGETC5 BSR CHAROUT 00000D60 6100 FB40 1072 BSR CRLF 00000D64 4E75 1073 RTS 00000D66 1074 ; 00000D66 1075 ; Send : and space to the screen 00000D66 123C 003A 1076 COL_SP MOVE.B #':',D1 00000D6A 6100 FB0A 1077 BSR CHAROUT 00000D6E 123C 0020 1078 MOVE.B #' ',D1 00000D72 6100 FB02 1079 BSR CHAROUT 00000D76 4E75 1080 RTS 00000D78 1081 ; 00000D78 1082 ; Download a .HEX file in ASCII S-format. 00000D78 1083 ; A .HEX file consists of pure ASCII chars. 00000D78 1084 ; (See MacKenzie p.50.) The explanation 00000D78 1085 ; below with typical file lines is perfectly 00000D78 1086 ; general and applies to all files. 00000D78 1087 ; 00000D78 1088 ; The 1st line S00700007465737438 signifies: 00000D78 1089 ; S0 = header line 00000D78 1090 ; 07 = $7 bytes to load 00000D78 1091 ; 0000 = address, in this case meaningless 00000D78 1092 ; 74 65 73 74 = ASCII filename "TEST." 00000D78 1093 ; 38 = hex check byte used as follows: 16 00000D78 1094 ; bit check sum = 07+00+00+74+65+73+74+38=FF 00000D78 1095 ; 00000D78 1096 ; The following lines contain code and data. 00000D78 1097 ; A typical line S10780003200428183 means: 00000D78 1098 ; S1 = code line with 16 bit load address 00000D78 1099 ; 07 = $7 bytes to load 00000D78 1100 ; 8000 = start loading at this HEX address 00000D78 1101 ; 32 00 42 81 = code or data to load 00000D78 1102 ; 83 = hex check sum as above 00000D78 1103 ; 00000D78 1104 ; Another typical line S208AF800032004281D3 00000D78 1105 ; signifies: 00000D78 1106 ; S2 = code line with 24 bit load address 00000D78 1107 ; 08 = $8 bytes to load 00000D78 1108 ; AF8000 = start loading at this HEX address 00000D78 1109 ; 32 00 42 81 = execution code to load 00000D78 1110 ; D3 = hex check sum as always 00000D78 1111 ; 00000D78 1112 ; There are two kinds of footer line: 00000D78 1113 ; The line S90380007C signifies: 00000D78 1114 ; S9 = This line contains a 16-bit entry 00000D78 1115 ; address, in this case 8000. The byte 00000D78 1116 ; count is 03 and 7C is the check sum. 00000D78 1117 ; 00000D78 1118 ; The second kind of footer line is, e.g. 00000D78 1119 ; S804AF8000CC signifies: 00000D78 1120 ; S8 = This line contains a 24-bit entry 00000D78 1121 ; address, in this case AF8000. The byte 00000D78 1122 ; count is 04 and CC is the check sum. 00000D78 1123 ; 00000D78 1124 ; S5 lines exist too. They inform you of 00000D78 1125 ; the number of lines of code in the file. 00000D78 1126 ; Nothing will happen if we simply ignore 00000D78 1127 ; these lines. 00000D78 1128 ; 00000D78 1129 ; The code directly below steers the 00000D78 1130 ; loading. 00000D78 2A7C 00000000 1131 LD_FILE MOVEA.L #0,A5 ;A5 holds offset address 00000D7E 0C2E 000D FFFF 1132 CMPI.B #CR,-1(A6) ;Is previous CHAR a CR? 00000D84 6706 1133 BEQ.S LD_FIL0 ;Yes so skip 00000D86 6100 FD34 1134 BSR GETADR ;get offset address 00000D8A 2A42 1135 MOVEA.L D2,A5 ;save for later 00000D8C 267C 00002CA9 1136 LD_FIL0 MOVEA.L #LS_MSG,A3 ;Tell'em to start 00000D92 6100 FAFE 1137 BSR PRTMSG ;sending the file 00000D96 6100 FACE 1138 LD_FIL1 BSR CHARIN ;Get first char 00000D9A 0C01 0003 1139 CMPI.B #3,D1 ;Is it ^C? 00000D9E 6700 F66C 1140 BEQ GET_CMD ;Yes, so abandon 00000DA2 0C01 0053 1141 CMPI.B #'S',D1 ;Is it 'S'? 00000DA6 670C 1142 BEQ.S IS_S ;Yes, get next char 00000DA8 1143 ; The end of line CR and LF are handled here. If 00000DA8 1144 ; it's a CR then send a CRLF else get another char 00000DA8 0C01 000D 1145 CMPI.B #CR,D1 ;Is it CR? 00000DAC 66E8 1146 BNE.S LD_FIL1 ;No, so dump LFs 00000DAE 6100 FAF2 1147 BSR CRLF ;If CR, then do CRLF 00000DB2 66E2 1148 BNE.S LD_FIL1 ;get another char 00000DB4 6100 FAC0 1149 IS_S BSR CHAROUT ;Print the 'S' 00000DB8 6100 FAE2 1150 BSR CHARIO ;get next char 00000DBC 0C01 0030 1151 CMPI.B #'0',D1 ;Is it '0'? 00000DC0 673A 1152 BEQ.S S0 ;if so branch 00000DC2 51F9 0000FFFC 1153 SF S2_FLG ;Reset flag 00000DC8 0C01 0031 1154 CMPI.B #'1',D1 ;Is it '1'? 00000DCC 6766 1155 BEQ.S S12 ;It's '1' so process 00000DCE 50F9 0000FFFC 1156 ST S2_FLG ;Set flag 00000DD4 0C01 0032 1157 CMPI.B #'2',D1 ;Is it '2'? 00000DD8 675A 1158 BEQ.S S12 ;It's '2' so process 00000DDA 0C01 0035 1159 CMPI.B #'5',D1 ;Is it '5'? 00000DDE 6766 1160 BEQ.S S5 ;Yes, go dump line 00000DE0 50F9 0000FFFC 1161 ST S2_FLG ;Set flag 00000DE6 0C01 0038 1162 CMPI.B #'8',D1 ;Is it '8'? 00000DEA 676E 1163 BEQ.S S89 ;if so branch 00000DEC 51F9 0000FFFC 1164 SF S2_FLG ;Reset flag 00000DF2 0C01 0039 1165 CMPI.B #'9',D1 ;Is it '9'? 00000DF6 6762 1166 BEQ.S S89 ;if so branch 00000DF8 6000 013E 1167 BRA LD_ERR ;None of above, err 00000DFC 1168 ; 00000DFC 1169 ; A line that begins with S0 is the header 00000DFC 1170 ; containing the name 00000DFC 4204 1171 S0 CLR.B D4 ;Null hex check sum 00000DFE 6100 00A2 1172 BSR LD_NUM ;line length in D2.B 00000E02 6100 00B8 1173 BSR LD_ADR ;discard 0000 00000E06 207C 0000FF60 1174 MOVEA.L #PRTBUF,A0 00000E0C 0C02 0001 1175 CMPI.B #1,D2 ;hex check byte yet? 00000E10 6718 1176 BEQ.S S0B ;jump if there's no name 00000E12 2F02 1177 S0A MOVE.L D2,-(A7) ;push line length 00000E14 6100 008C 1178 BSR LD_NUM ;get a name char 00000E18 1202 1179 MOVE.B D2,D1 00000E1A 241F 1180 MOVE.L (A7)+,D2 ;pop line length 00000E1C 6100 FCCA 1181 BSR UP_CASE ;change to UC 00000E20 10C1 1182 MOVE.B D1,(A0)+ ;store it 00000E22 5302 1183 SUBQ.B #1,D2 ;length counter = 1? 00000E24 0C02 0001 1184 CMPI.B #1,D2 ;hex check byte yet? 00000E28 66E8 1185 BNE.S S0A ;if not then loop 00000E2A 4210 1186 S0B CLR.B (A0) ;end name with NULL 00000E2C 6100 00EC 1187 BSR LD_CHK ;branch chk 00000E30 6000 FF64 1188 BRA LD_FIL1 ;Go to next line 00000E34 1189 ; 00000E34 1190 ; Loads an S1 or S2 line 00000E34 4204 1191 S12 CLR.B D4 ;Null hex check sum 00000E36 616A 1192 BSR.S LD_NUM ;line length in D2.B 00000E38 6100 0082 1193 BSR LD_ADR ;line address in A4 00000E3C D9CD 1194 ADDA.L A5,A4 ;Add offset to address 00000E3E 6100 00B6 1195 BSR LD_DATA ;load data 00000E42 6000 FF52 1196 BRA LD_FIL1 ;Go to next line 00000E46 1197 ; 00000E46 1198 ; Discard all chars in the S5 line 00000E46 6100 005A 1199 S5 BSR LD_NUM ;line length in D2.B 00000E4A D402 1200 ADD.B D2,D2 ;double it and add 2 00000E4C 5402 1201 ADDQ.B #2,D2 ;to discard the CRLF 00000E4E 6100 FA4C 1202 S5A BSR CHARIO ;Input and echo char 00000E52 5302 1203 SUBQ.B #1,d2 00000E54 66F8 1204 BNE.S S5A 00000E56 6000 FF3E 1205 BRA LD_FIL1 ;Go to next line 00000E5A 1206 ; 00000E5A 1207 ; End of file line. Its data is used to 00000E5A 1208 ; change the value of the user PC. Works 00000E5A 1209 ; with S8 and S9 lines. 00000E5A 4204 1210 S89 CLR.B D4 ;Null hex check sum 00000E5C 6144 1211 BSR.S LD_NUM ;line length in D2.B 00000E5E 615C 1212 BSR.s LD_ADR ;load address in A4 00000E60 23CC 0000FFD0 1213 MOVE.L A4,SAV_PC ;save it 00000E66 B9FC 00000000 1214 CMPA.L #0,A4 00000E6C 670C 1215 BEQ.S S89A 00000E6E 23CC 0000FF3A 1216 MOVE.L A4,UNADR 00000E74 23CC 0000FFD6 1217 MOVE.L A4,DUMPADR 00000E7A 6100 009E 1218 S89A BSR LD_CHK 00000E7E 6100 FA1C 1219 BSR CHARIO ;read the final CR 00000E82 6100 FA18 1220 BSR CHARIO ;and LF 00000E86 6100 FA1A 1221 BSR CRLF 00000E8A 267C 0000FF60 1222 MOVEA.L #PRTBUF,A3 ;print file name 00000E90 6100 FA00 1223 BSR PRTMSG 00000E94 267C 00002C88 1224 MOVEA.L #LG_MSG,A3 ;print 00000E9A 6100 F9F6 1225 BSR PRTMSG ;successful load 00000E9E 6000 F56C 1226 BRA GET_CMD ;go to prompt 00000EA2 1227 ; 00000EA2 1228 ; Reads and echos the two ASCII bytes repre- 00000EA2 1229 ; senting a number and converts them to a HEX 00000EA2 1230 ; number in D2.B. Thus a '2' & 'E' is conver- 00000EA2 1231 ; ted to $2E. Also updates checksum in D4.B 00000EA2 6100 F9F8 1232 LD_NUM BSR CHARIO ;get first char 00000EA6 6100 FBA6 1233 BSR ASC_BCD ;convert it to BCD 00000EAA E919 1234 ROL.B #4,D1 ;move it to MSB 00000EAC 1401 1235 MOVE.B D1,D2 ;copy to reg D2 00000EAE 6100 F9EC 1236 BSR CHARIO ;get second char 00000EB2 6100 FB9A 1237 BSR ASC_BCD ;convert it to hex 00000EB6 D401 1238 ADD.B D1,D2 ;add them 00000EB8 D802 1239 ADD.B D2,D4 ;update check sum 00000EBA 4E75 1240 RTS 00000EBC 1241 ; 00000EBC 1242 ; Routine to extract 16 or 24 bit address 00000EBC 1243 ; from S-file into A4. The line count in D2.B 00000EBC 1244 ; represents the # of words in the S-line. 00000EBC 1245 ; The address info takes 2 or 3 words so the 00000EBC 1246 ; line count is reduced by 2 or 3 at routine's 00000EBC 1247 ; end. Also updates checksum in D4.B 00000EBC 4283 1248 LD_ADR CLR.L D3 ;D3.L = 0 00000EBE 3A3C 0003 1249 MOVE.W #3,D5 ;Get set for 4 times 00000EC2 4A39 0000FFFC 1250 TST.B S2_FLG ;See if set 00000EC8 6702 1251 BEQ.S LD_AD1 ;Not set, so skip 00000ECA 5445 1252 ADDQ.W #2,D5 ;Change to 6 times 00000ECC E99B 1253 LD_AD1 ROL.L #4,D3 ;move it up a nibble 00000ECE 6100 F9CC 1254 BSR CHARIO ;Get char & convert 00000ED2 6100 FB7A 1255 BSR ASC_BCD ;to hex in D1.B 00000ED6 D601 1256 ADD.B D1,D3 ;Add it to D3.B and 00000ED8 51CD FFF2 1257 DBRA D5,LD_AD1 ;Loop 4 or 6 times 00000EDC 2843 1258 MOVEA.L D3,A4 ;Put address in A4 00000EDE D803 1259 ADD.B D3,D4 ;Update check sum 00000EE0 E15B 1260 ROL.W #8,D3 ;for both bytes in 00000EE2 D803 1261 ADD.B D3,D4 ;D3.W 00000EE4 4843 1262 SWAP D3 ;Update 3rd byte too 00000EE6 D803 1263 ADD.B D3,D4 ;Checksum now in D4.B 00000EE8 5502 1264 SUBQ.B #2,D2 ;line counter-2 00000EEA 4A39 0000FFFC 1265 TST.B S2_FLG ;If not set, skip 00000EF0 6702 1266 BEQ.S LD_AD2 ;Set, so do one more 00000EF2 5302 1267 SUBQ.B #1,D2 ;subtraction 00000EF4 4E75 1268 LD_AD2 RTS 00000EF6 1269 ; 00000EF6 1270 ; Loads, into RAM, data in a HEX file whose 00000EF6 1271 ; line begins with S1 or S2. D2 holds the 00000EF6 1272 ; byte count and A4 the loading address. Also 00000EF6 1273 ; updates checksum which is finally checked 00000EF6 1274 ; by the routine that follows. 00000EF6 0C02 0001 1275 LD_DATA CMPI.B #1,D2 ;At check byte? 00000EFA 671E 1276 BEQ.S LD_CHK ;Yes, jump 00000EFC 6100 F99E 1277 BSR CHARIO ;get char 00000F00 6100 FB4C 1278 BSR ASC_BCD ;convert to hex 00000F04 E919 1279 ROL.B #4,D1 ;move it to MSB 00000F06 1601 1280 MOVE.B D1,D3 ;copy to reg D3 00000F08 6100 F992 1281 BSR CHARIO ;get second char 00000F0C 6100 FB40 1282 BSR ASC_BCD ;convert it to hex 00000F10 D601 1283 ADD.B D1,D3 ;add them 00000F12 18C3 1284 MOVE.B D3,(A4)+ ;move to load addr 00000F14 D803 1285 ADD.B D3,D4 ;update check sum 00000F16 5302 1286 SUBQ.B #1,D2 ;decr. line counter 00000F18 60DC 1287 BRA.S LD_DATA ;Go for more 00000F1A 1288 ; Gets the last byte in an S line. If check 00000F1A 1289 ; sum is not 0FFH it flags an error. 00000F1A 6100 F980 1290 LD_CHK BSR CHARIO ;get char 00000F1E 6100 FB2E 1291 BSR ASC_BCD ;convert it to hex 00000F22 E919 1292 ROL.B #4,D1 ;move it to MSB 00000F24 1601 1293 MOVE.B D1,D3 ;copy to reg D3 00000F26 6100 F974 1294 BSR CHARIO ;get second char 00000F2A 6100 FB22 1295 BSR ASC_BCD ;convert it to hex 00000F2E D601 1296 ADD.B D1,D3 ;add them 00000F30 D803 1297 ADD.B D3,D4 ;should = 0FFH 00000F32 5204 1298 ADDQ.B #1,D4 ;Should be 0 00000F34 6602 1299 BNE.S LD_ERR ;Not 0, so flag it 00000F36 4E75 1300 RTS 00000F38 1301 ; 00000F38 1302 ; Flags loading error and goes to GET_CMD 00000F38 267C 00002C63 1303 LD_ERR MOVEA.L #LE_MSG,A3 ;get message ptr 00000F3E 6000 1050 1304 BRA REPORT ;restart monitor 00000F42 1305 ; 00000F42 1306 ; Routine that initializes the tracing 00000F42 0C2E 000D FFFF 1307 BEG_TRC CMPI.B #CR,-1(A6) ;is previous CR? 00000F48 670A 1308 BEQ.S BEG1 ;yes, so start 00000F4A 6100 FB70 1309 BSR GETADR ;get execution addr 00000F4E 23C2 0000FFD0 1310 MOVE.L D2,SAV_PC ;save it 00000F54 6100 FC5C 1311 BEG1 BSR REGREST ;restore user regs 00000F58 007C 8000 1312 ORI.W #$8000,SR ;enable tracing 00000F5C 4E73 1313 RTE 00000F5E 1314 ; 00000F5E 1315 ; If the SKIPFLG is set then jump to TRACE5, else 00000F5E 1316 ; proceed normally. In the regular trace no tracing 00000F5E 1317 ; is done on the 1st pass. If a TRAP instruction is 00000F5E 1318 ; next then tracing is terminated. Tracing continues 00000F5E 1319 ; when a CR is typed. Any other chararacter causes 00000F5E 1320 ; termination of tracing. The FP_FLG is 0 in entry. 00000F5E 6100 FC26 1321 TRACE BSR REG_SAV ;save USER registers 00000F62 4A39 0000FFFA 1322 TST.B FP_FLG ;is flag = 0? 00000F68 6608 1323 BNE.S TRACE0 ;no, so continue 00000F6A 50F9 0000FFFA 1324 ST FP_FLG ;it was 0, so set it 00000F70 6068 1325 BRA.S TRACE4 ;do nothing this time 00000F72 4A39 0000FFFB 1326 TRACE0 TST.B SKIPFLG ;If not 0 00000F78 6676 1327 BNE.S TRACE5 ;then jump 00000F7A 6100 FC58 1328 BSR REG_PRT ;display them 00000F7E 1329 ; Check if TRAP is the next instruction. 00000F7E 2079 0000FFD0 1330 MOVEA.L SAV_PC,A0 00000F84 0C50 4E4F 1331 CMPI.W #$4E4F,(A0) ;> TRAP #15? 00000F88 6E12 1332 BGT.S TRACE1 ;you're okay 00000F8A 0C50 4E40 1333 CMPI.W #$4E40,(A0) ;< TRAP #0? 00000F8E 6D0C 1334 BLT.S TRACE1 ;okay again 00000F90 267C 00002D4A 1335 MOVEA.L #TRC_MSG,A3 00000F96 6100 F8FA 1336 BSR PRTMSG 00000F9A 6020 1337 BRA.S TRACE2 00000F9C 1338 ; Check for CHARIN. If CR then keep tracing. 00000F9C 123C 003E 1339 TRACE1 MOVE.B #'>',D1 00000FA0 6100 F8D4 1340 BSR CHAROUT 00000FA4 6100 F8C0 1341 BSR CHARIN 00000FA8 0C01 000D 1342 CMPI.B #CR,D1 00000FAC 6728 1343 BEQ.S TRACE3 00000FAE 6100 F8C6 1344 BSR CHAROUT ; If R modify register 00000FB2 6100 FB34 1345 BSR UP_CASE ; <<<< Added in mon209 >>>> 00000FB6 0C01 0052 1346 CMPI.B #'R',D1 ; <<<< Added in mon209 >>>> 00000FBA 6752 1347 BEQ.S TRACE6 ; <<<< Added in mon209 >>>> 00000FBC 1348 ; Turn off all tracing and put out prompt. 00000FBC 027C 7FFF 1349 TRACE2 ANDI.W #$7FFF,SR ;disable tracing 00000FC0 007C 2000 1350 ORI.W #$2000,SR ;enable supervisor 00000FC4 0279 7FFF 0000FFD4 1351 ANDI.W #$7FFF,SAV_SR ;fix the USR 00000FCC 51F9 0000FFFA 1352 SF FP_FLG ;clear flag 00000FD2 6000 F438 1353 BRA GET_CMD 00000FD6 1354 ; Continue tracing 00000FD6 6100 F8CA 1355 TRACE3 BSR CRLF 00000FDA 0279 0FFF 0000FFD4 1356 TRACE4 ANDI.W #$0FFF,SAV_SR ;enable user 00000FE2 0079 8000 0000FFD4 1357 ORI.W #$8000,SAV_SR ;enable tracing 00000FEA 6100 FBC6 1358 BSR REGREST 00000FEE 4E73 1359 RTE 00000FF0 1360 ; 00000FF0 1361 ; TRACE saved the USER registers. This means 00000FF0 1362 ; that the return address of the routine 00000FF0 1363 ; that called GOSKIP is next on the stack. 00000FF0 027C 7FFF 1364 TRACE5 ANDI.W #$7FFF,SR ;disable tracing 00000FF4 007C 2000 1365 ORI.W #$2000,SR ;enable supervisor 00000FF8 0279 7FFF 0000FFD4 1366 ANDI.W #$7FFF,SAV_SR ;fix the USR 00001000 51F9 0000FFFB 1367 SF SKIPFLG ;clear flag 00001006 51F9 0000FFFA 1368 SF FP_FLG ;clear flag 0000100C 4E75 1369 RTS ;pick up where you left off 0000100E 1370 ; 0000100E 1371 ; <<<< Added in mon209 >>>> 0000100E 1372 ; Get register to be modified then 0000100E 1373 ; set register value 0000100E 6100 FAEA 1374 TRACE6 BSR GETLIN 00001012 2C7C 0000FF70 1375 MOVEA.L #INPBUF,A6 ;point to buffer 00001018 13FC 00FF 0000FF48 1376 MOVE.B #$0FF,REGTYP 00001020 6100 F714 1377 BSR REGMOD0 00001024 6000 FF76 1378 BRA TRACE1 00001028 1379 ; 00001028 1380 ; Set (at most two) permanent breakpoints. 00001028 1381 ; B displays the current breakpoints. 00001028 1382 ; B 1
sets breakpoint 1. 00001028 1383 ; B 1 clears breakpoint 1. 00001028 0C2E 000D FFFF 1384 BREAK CMPI.B #CR,-1(A6) ;is previous CR? 0000102E 6728 1385 BEQ.S DSPBRK 00001030 1386 ; get breakpoint number in D2.L 00001030 207C 0000FFDA 1387 MOVEA.L #BP_AD3,A0 00001036 0C16 0031 1388 CMPI.B #'1',(A6) ;is char a '1'? 0000103A 6706 1389 BEQ.S BREAK1 ;no, then go on 0000103C 207C 0000FFDE 1390 MOVEA.L #BP_AD4,A0 00001042 528E 1391 BREAK1 ADDQ.L #1,A6 ;point past # 00001044 0C16 000D 1392 CMPI.B #CR,(A6) ;is it a CR? 00001048 6604 1393 BNE.S BREAK2 0000104A 4290 1394 CLR.L (A0) 0000104C 6006 1395 BRA.S BREAK3 0000104E 6100 FA6C 1396 BREAK2 BSR GETADR 00001052 2082 1397 MOVE.L D2,(A0) ;save it 00001054 6000 F3B6 1398 BREAK3 BRA GET_CMD 00001058 1399 ; 00001058 1400 ;Deal with 1st breakpoint first. 00001058 267C 000025EA 1401 DSPBRK MOVEA.L #MSG_8,A3 ;breakpoint 1: 0000105E 6100 F832 1402 BSR PRTMSG 00001062 207C 0000FFDA 1403 MOVEA.L #BP_AD3,A0 ;A0 -> #BP_AD3 00001068 4A90 1404 TST.L (A0) 0000106A 660C 1405 BNE.S DSPBRK1 0000106C 267C 0000260C 1406 MOVEA.L #MSG_10,A3 00001072 6100 F81E 1407 BSR PRTMSG 00001076 6006 1408 BRA.S DSPBRK2 00001078 2410 1409 DSPBRK1 MOVE.L (A0),D2 0000107A 6100 F99A 1410 BSR PRT_SIX 0000107E 1411 ;Deal with 2nd breakpoint next. 0000107E 267C 000025FB 1412 DSPBRK2 MOVEA.L #MSG_9,A3 ;breakpoint 1: 00001084 6100 F80C 1413 BSR PRTMSG 00001088 207C 0000FFDE 1414 MOVEA.L #BP_AD4,A0 ;A0 -> #BP_AD3 0000108E 4A90 1415 TST.L (A0) 00001090 660C 1416 BNE.S DSPBRK3 00001092 267C 0000260C 1417 MOVEA.L #MSG_10,A3 00001098 6100 F7F8 1418 BSR PRTMSG 0000109C 6006 1419 BRA.S DSPBRK4 0000109E 2410 1420 DSPBRK3 MOVE.L (A0),D2 000010A0 6100 F974 1421 BSR PRT_SIX 000010A4 6000 F366 1422 DSPBRK4 BRA GET_CMD 000010A8 1423 ; 000010A8 1424 ; Finds and prints the sum and difference 000010A8 1425 ; of 2 HEX numbers 000010A8 6100 FA12 1426 HEXCALC BSR GETADR ;get first number 000010AC 2602 1427 MOVE.L D2,D3 ;move it to D3 000010AE 6100 FA0C 1428 BSR GETADR ;get second number 000010B2 2802 1429 MOVE.L D2,D4 ;make a spare in D4 000010B4 D483 1430 ADD.L D3,D2 ;add them 000010B6 267C 00002CE8 1431 MOVEA.L #HS_MSG,A3 000010BC 6100 F7D4 1432 BSR PRTMSG ;print sum msg 000010C0 6100 F94A 1433 BSR PRT_LON ;print sum 000010C4 2404 1434 MOVE.L D4,D2 ;reload original D2 000010C6 9682 1435 SUB.L D2,D3 ;subtract them 000010C8 2403 1436 MOVE.L D3,D2 ;move to D2 to print 000010CA 267C 00002CF2 1437 MOVEA.L #HD_MSG,A3 000010D0 6100 F7C0 1438 BSR PRTMSG ;print diff msg 000010D4 6100 F936 1439 BSR PRT_LON ;print difference 000010D8 6000 F332 1440 BRA GET_CMD ;put out prompt 000010DC 1441 ; 000010DC 1442 ;**************************************************** 000010DC 1443 ;Begin Unassemble Routines 000010DC 1444 ;**************************************************** 000010DC 1445 ; 000010DC 1446 ;First get the disassembly start address and # of lines 000010DC 1E3C 000A 1447 UNASM MOVE.B #10,D7 ;Prepare to do 10 lines 000010E0 0C2E 000D FFFF 1448 CMPI.B #CR,-1(A6) ;is previous CR? 000010E6 660A 1449 BNE.S UNASMS1 ;no, so proceed 000010E8 2439 0000FF3A 1450 MOVE.L UNADR,D2 ;get old disassebly addr 000010EE 2A42 1451 MOVEA.L D2,A5 ;into A5 000010F0 6028 1452 BRA.S UNASMS3 ;stick with 10 lines & go on 000010F2 0C16 002C 1453 UNASMS1 CMPI.B #',',(A6) ;is char a comma? 000010F6 660C 1454 BNE.S USM1 ;no, then get start address 000010F8 2439 0000FF3A 1455 MOVE.L UNADR,D2 ;get old disassebly addr 000010FE 2A42 1456 MOVEA.L D2,A5 ;into A5 00001100 528E 1457 ADDQ.L #1,A6 ;point past comma 00001102 6010 1458 BRA.S UNASMS2 ;get count 00001104 6100 F9B6 1459 USM1 BSR GETADR ;get start address into D2 00001108 2A42 1460 MOVEA.L D2,A5 ;and put into A5 0000110A 0C2E 000D FFFF 1461 CMPI.B #CR,-1(A6) ;is previous CR? 00001110 6602 1462 BNE.S UNASMS2 ;no, so proceed 00001112 6006 1463 BRA.S UNASMS3 00001114 6100 F9A6 1464 UNASMS2 BSR GETADR ;get # of lines to display 00001118 1E02 1465 MOVE.B D2,D7 0000111A 1466 ;Command line is totally parsed, so do the disassembly 0000111A 6100 0054 1467 UNASMS3 BSR UNASMB ;call unasm core routine 0000111E 240D 1468 MOVE.L A5,D2 ;move instruction address 00001120 6100 F8F4 1469 BSR PRT_SIX ;into D2 and print it 00001124 6100 F792 1470 BSR TWO_SP ;two space 00001128 4283 1471 CLR.L D3 ;blank spaces counter (BSC) 0000112A 341D 1472 UNASMS4 MOVE.W (A5)+,D2 ;get word 0000112C 6100 F8D4 1473 BSR PRT_WRD ;print word of hex code 00001130 6100 F77E 1474 BSR SPACE ;space 00001134 5403 1475 ADDQ.B #2,D3 ;add 2 bytes to BSC 00001136 5506 1476 SUBQ.B #2,D6 ;reduce length counter by 2 00001138 66F0 1477 BNE.S UNASMS4 ;if more bytes print again 0000113A 0C03 000A 1478 UNASMS5 CMPI.B #10,D3 ;is the string 10 bytes 0000113E 6C10 1479 BGE.S UNASMS6 00001140 6100 F776 1480 BSR TWO_SP 00001144 6100 F772 1481 BSR TWO_SP 00001148 6100 F766 1482 BSR SPACE 0000114C 5403 1483 ADDQ.B #2,D3 0000114E 60EA 1484 BRA.S UNASMS5 00001150 6100 F75E 1485 UNASMS6 BSR SPACE ;space 00001154 267C 0000FF3E 1486 MOVEA.L #UASMCMD,A3 ;point A3 to unasm cmd buff 0000115A 6100 F736 1487 BSR PRTMSG ;display commant text 0000115E 6100 F742 1488 BSR CRLF 00001162 5307 1489 SUBQ.B #1,D7 00001164 66B4 1490 BNE.S UNASMS3 00001166 23CD 0000FF3A 1491 MOVE.L A5,UNADR 0000116C 6000 F29E 1492 BRA GET_CMD 00001170 1493 ; 00001170 1494 ; 32 bytes of ram are reserved above the stacks 00001170 1495 ; for the text of the disassembled command. 00001170 1496 ; UNASMCMD points to the beginning and 00001170 1497 ; UNASMOPR points 9 characters in, so the operands 00001170 1498 ; are always evenly spaced. The text is ternminated 00001170 1499 ; with a zero and can be displayed with a call to 00001170 1500 ; PRTMSG. 00001170 1501 ; 00001170 1502 ;example 00001170 1503 ;12345678901234567890123456789012 00001170 1504 ;MOVE.B #$01,D0 00001170 1505 ;^ ^ 00001170 1506 ;| |---UNASMOPR 00001170 1507 ;| 00001170 1508 ;|------UNASMCMD 00001170 1509 ; 00001170 1510 ; Disasemble routine. When called, A5 points to code. 00001170 1511 ; Use of Registers 00001170 1512 ; D0-Varies A0-Varies 00001170 1513 ; D1-Varies A1-Varies 00001170 1514 ; D2-Varies A2-Varies 00001170 1515 ; D3-Varies A3-Varies 00001170 1516 ; D4-cmd size (B,W,L) A4-Instruction text buffer 00001170 1517 ; D5-instruction hex (W) A5-Ptr. to 1st byte of code 00001170 1518 ; D6-instr lngth (bytes) A6-Varies 00001170 1519 ; D7-loop count A7-stack 00001170 1520 ; 00001170 3A15 1521 UNASMB MOVE.W (A5),D5 ;D5 gets 1st byte of code 00001172 7C02 1522 MOVE.L #2,D6 ;D6 will have # of bytes in code 00001174 287C 0000FF3E 1523 MOVEA.L #UASMCMD,A4 ;A4 -> to unasm cmd buff 0000117A 1524 ; 0000117A 123C 0020 1525 MOVE.B #32,D1 ;Prefill UASMCMD with 32 ' 's 0000117E 18FC 0020 1526 UNASML MOVE.B #' ',(A4)+ 00001182 5301 1527 SUBQ.B #1,D1 00001184 66F8 1528 BNE.S UNASML 00001186 1529 ; 00001186 287C 0000FF3E 1530 MOVEA.L #UASMCMD,A4 ;Repoint A4 0000118C 6114 1531 BSR.S UNSEAR ;Returns with A3 -> matching cmd 0000118E 226B 000A 1532 MOVEA.L 10(A3),A1 ;put sub-routine addr in A1 00001192 588B 1533 ADDQ.L #4,A3 ;point A3 to inst txt 00001194 121B 1534 UNASM1 MOVE.B (A3)+,D1 ;get a char 00001196 6704 1535 BEQ.S UNASM2 ;stop on 0 00001198 18C1 1536 MOVE.B D1,(A4)+ ;move to cmd buff 0000119A 60F8 1537 BRA.S UNASM1 ;do it again 0000119C 4E91 1538 UNASM2 JSR (A1) ;run sub-routine 0000119E 421C 1539 CLR.B (A4)+ ;end cmd text with zero 000011A0 4E75 1540 RTS 000011A2 1541 ; 000011A2 1542 ; This routine searches through the list of commands 000011A2 1543 ; UNINSTR, comparing to the code. When a match is 000011A2 1544 ; found, the routine returns with A3 pointing to it. 000011A2 267C 00001FD6 1545 UNSEAR MOVEA.L #UNINSTR,A3 ;point A3 to first cmd 000011A8 3005 1546 UNSEAR0 MOVE.W D5,D0 ;Get opcode into D0 000011AA C06B 0002 1547 AND.W 2(A3),D0 ;AND opcode word with mask 000011AE B053 1548 CMP.W (A3),D0 ;CMP result with stored word 000011B0 6708 1549 BEQ.S UNSEARE ;Same, so done 000011B2 D7FC 0000000E 1550 ADDA.L #14,A3 ;Test failed, so try next one 000011B8 60EE 1551 BRA.S UNSEAR0 000011BA 4E75 1552 UNSEARE RTS 000011BC 1553 ; 000011BC 1554 ; The following subroutines are for the specific 000011BC 1555 ; commands. They all follow a similar format. 000011BC 1556 ; First, if need be, move the length info to the end 000011BC 1557 ; of the instruction, i.e. (.B, .L, .W). Next shift A4 000011BC 1558 ; to UNASMOPR, then find the operands. 000011BC 1559 ; 000011BC 1560 ;for commands with no operands 000011BC 4E75 1561 U00 RTS 000011BE 1562 ; 000011BE 1563 ; ILLEGAL adds AL to end of instruction 000011BE 18FC 0041 1564 U01 MOVE.B #'A',(A4)+ 000011C2 18FC 004C 1565 MOVE.B #'L',(A4)+ 000011C6 4E75 1566 RTS 000011C8 1567 ; 000011C8 1568 ; ADD, SUB, AND, EOR, OR, CMP 000011C8 4280 1569 U02 CLR.L D0 000011CA 103C 0007 1570 MOVE.B #7,D0 000011CE 6100 0B72 1571 BSR USZ 000011D2 287C 0000FF46 1572 MOVEA.L #UASMOPR,A4 000011D8 103C 0008 1573 MOVE.B #8,D0 000011DC 0105 1574 BTST D0,D5 000011DE 6716 1575 BEQ.S U02_01 000011E0 18FC 0044 1576 MOVE.B #'D',(A4)+ 000011E4 103C 000B 1577 MOVE.B #11,D0 000011E8 6100 0B28 1578 BSR UREG 000011EC 18FC 002C 1579 MOVE.B #',',(A4)+ 000011F0 6100 08AA 1580 BSR UEA 000011F4 6014 1581 BRA.S U02_02 000011F6 6100 08A4 1582 U02_01 BSR UEA 000011FA 18FC 002C 1583 MOVE.B #',',(A4)+ 000011FE 18FC 0044 1584 MOVE.B #'D',(A4)+ 00001202 103C 000B 1585 MOVE.B #11,D0 00001206 6100 0B0A 1586 BSR UREG 0000120A 4E75 1587 U02_02 RTS 0000120C 1588 ; 0000120C 1589 ; ADDA, SUBA, CMPA 0000120C 4280 1590 U03 CLR.L D0 0000120E 103C 0008 1591 MOVE.B #8,D0 00001212 0105 1592 BTST D0,D5 00001214 6712 1593 BEQ.S U03_01 00001216 18FC 002E 1594 MOVE.B #'.',(A4)+ 0000121A 18FC 004C 1595 MOVE.B #'L',(A4)+ 0000121E 18FC 0020 1596 MOVE.B #' ',(A4)+ 00001222 183C 004C 1597 MOVE.B #'L',D4 00001226 6010 1598 BRA.S U03_02 00001228 18FC 002E 1599 U03_01 MOVE.B #'.',(A4)+ 0000122C 18FC 0057 1600 MOVE.B #'W',(A4)+ 00001230 18FC 0020 1601 MOVE.B #' ',(A4)+ 00001234 183C 0057 1602 MOVE.B #'W',D4 00001238 287C 0000FF46 1603 U03_02 MOVEA.L #UASMOPR,A4 0000123E 6100 085C 1604 BSR UEA 00001242 18FC 002C 1605 MOVE.B #',',(A4)+ 00001246 18FC 0041 1606 MOVE.B #'A',(A4)+ 0000124A 103C 000B 1607 MOVE.B #11,D0 0000124E 6100 0AC2 1608 BSR UREG 00001252 4E75 1609 RTS 00001254 1610 ; 00001254 1611 ; ADDX, SUBX 00001254 4280 1612 U04 CLR.L D0 00001256 103C 0007 1613 MOVE.B #7,D0 0000125A 6100 0AE6 1614 BSR USZ 0000125E 287C 0000FF46 1615 MOVEA.L #UASMOPR,A4 00001264 103C 0003 1616 MOVE.B #3,D0 00001268 0105 1617 BTST D0,D5 0000126A 6736 1618 BEQ.S U04_01 0000126C 18FC 002D 1619 MOVE.B #'-',(A4)+ 00001270 18FC 0028 1620 MOVE.B #'(',(A4)+ 00001274 18FC 0041 1621 MOVE.B #'A',(A4)+ 00001278 103C 0002 1622 MOVE.B #2,D0 0000127C 6100 0A94 1623 BSR UREG 00001280 18FC 0029 1624 MOVE.B #')',(A4)+ 00001284 18FC 002C 1625 MOVE.B #',',(A4)+ 00001288 18FC 002D 1626 MOVE.B #'-',(A4)+ 0000128C 18FC 0028 1627 MOVE.B #'(',(A4)+ 00001290 18FC 0041 1628 MOVE.B #'A',(A4)+ 00001294 103C 000B 1629 MOVE.B #11,D0 00001298 6100 0A78 1630 BSR UREG 0000129C 18FC 0029 1631 MOVE.B #')',(A4)+ 000012A0 601C 1632 BRA.S U04_02 000012A2 18FC 0044 1633 U04_01 MOVE.B #'D',(A4)+ 000012A6 103C 0002 1634 MOVE.B #2,D0 000012AA 6100 0A66 1635 BSR UREG 000012AE 18FC 002C 1636 MOVE.B #',',(A4)+ 000012B2 18FC 0044 1637 MOVE.B #'D',(A4)+ 000012B6 103C 000B 1638 MOVE.B #11,D0 000012BA 6100 0A56 1639 BSR UREG 000012BE 4E75 1640 U04_02 RTS 000012C0 1641 ; 000012C0 1642 ; CMPM 000012C0 4280 1643 U05 CLR.L D0 000012C2 103C 0007 1644 MOVE.B #7,D0 000012C6 6100 0A7A 1645 BSR USZ 000012CA 287C 0000FF46 1646 MOVEA.L #UASMOPR,A4 000012D0 18FC 0028 1647 MOVE.B #'(',(A4)+ 000012D4 18FC 0041 1648 MOVE.B #'A',(A4)+ 000012D8 103C 0002 1649 MOVE.B #02,D0 000012DC 6100 0A34 1650 BSR UREG 000012E0 18FC 0029 1651 MOVE.B #')',(A4)+ 000012E4 18FC 002B 1652 MOVE.B #'+',(A4)+ 000012E8 18FC 002C 1653 MOVE.B #',',(A4)+ 000012EC 18FC 0028 1654 MOVE.B #'(',(A4)+ 000012F0 18FC 0041 1655 MOVE.B #'A',(A4)+ 000012F4 103C 000B 1656 MOVE.B #11,D0 000012F8 6100 0A18 1657 BSR UREG 000012FC 18FC 0029 1658 MOVE.B #')',(A4)+ 00001300 18FC 002B 1659 MOVE.B #'+',(A4)+ 00001304 4E75 1660 RTS 00001306 1661 ; 00001306 1662 ; DIVU, DIVS, MULU, MULS 00001306 4280 1663 U06 CLR.L D0 00001308 183C 0057 1664 MOVE.B #'W',D4 0000130C 287C 0000FF46 1665 MOVEA.L #UASMOPR,A4 00001312 6100 0788 1666 BSR UEA 00001316 18FC 002C 1667 MOVE.B #',',(A4)+ 0000131A 18FC 0044 1668 MOVE.B #'D',(A4)+ 0000131E 103C 000B 1669 MOVE.B #11,D0 00001322 6100 09EE 1670 BSR UREG 00001326 4E75 1671 RTS 00001328 1672 ; 00001328 1673 ; ASL, ASR, LSL, LSR, ROXL, ROXR, ROL, ROR 00001328 1674 ; memory shifts 00001328 4280 1675 U07 CLR.L D0 0000132A 103C 0008 1676 MOVE.B #8,D0 ;check direction 0000132E 0105 1677 BTST D0,D5 00001330 6706 1678 BEQ.S U07_01 00001332 18FC 004C 1679 MOVE.B #'L',(A4)+ 00001336 6004 1680 BRA.S U07_02 00001338 18FC 0052 1681 U07_01 MOVE.B #'R',(A4)+ 0000133C 18FC 002E 1682 U07_02 MOVE.B #'.',(A4)+ 00001340 18FC 0057 1683 MOVE.B #'W',(A4)+ 00001344 183C 0057 1684 MOVE.B #'W',D4 00001348 287C 0000FF46 1685 MOVEA.L #UASMOPR,A4 0000134E 6100 074C 1686 BSR UEA 00001352 4E75 1687 RTS 00001354 1688 ; 00001354 1689 ; ASL, ASR, LSL, LSR, ROXL, ROXR, ROL, ROR 00001354 1690 ; register shifts 00001354 4280 1691 U08 CLR.L D0 00001356 103C 0008 1692 MOVE.B #8,D0 ;check direction 0000135A 0105 1693 BTST D0,D5 0000135C 6706 1694 BEQ.S U08_01 0000135E 18FC 004C 1695 MOVE.B #'L',(A4)+ 00001362 6004 1696 BRA.S U08_02 00001364 18FC 0052 1697 U08_01 MOVE.B #'R',(A4)+ 00001368 103C 0007 1698 U08_02 MOVE.B #7,D0 0000136C 6100 09D4 1699 BSR USZ 00001370 287C 0000FF46 1700 MOVEA.L #UASMOPR,A4 00001376 103C 0005 1701 MOVE.B #5,D0 0000137A 0105 1702 BTST D0,D5 ;i/r = 0 then count is within 0000137C 670E 1703 BEQ.S U08_03 ;bits 9,10,11 so jump 0000137E 18FC 0044 1704 MOVE.B #'D',(A4)+ ;i/r = 1 so count is in Dn 00001382 103C 000B 1705 MOVE.B #11,D0 00001386 6100 098A 1706 BSR UREG 0000138A 601A 1707 BRA.S U08_08 0000138C 18FC 0023 1708 U08_03 MOVE.B #'#',(A4)+ ;Store a # symbol 00001390 3205 1709 MOVE.W D5,D1 ;Don't trash D5 00001392 7009 1710 MOVE.L #9,D0 ;Put shift size in D0 00001394 E069 1711 LSR.W D0,D1 ;Move shift-count bits down 9 00001396 0201 0007 1712 ANDI.B #7,D1 ;Mask out unwanted stuff 0000139A 6604 1713 BNE.S U08_06 ;If not 0 then it's ready 0000139C 123C 0008 1714 MOVE.B #8,D1 ;If 0 replace with 8 000013A0 0601 0030 1715 U08_06 ADDI.B #'0',D1 ;Add the 30H to D1 000013A4 18C1 1716 MOVE.B D1,(A4)+ ;Store it 000013A6 18FC 002C 1717 U08_08 MOVE.B #',',(A4)+ ;Add a ',' 000013AA 18FC 0044 1718 MOVE.B #'D',(A4)+ ;Now add a 'D' 000013AE 7002 1719 MOVE.L #2,D0 ;Point to register bits 000013B0 6100 0960 1720 BSR UREG 000013B4 4E75 1721 RTS 000013B6 1722 ; 000013B6 1723 ; ANDI, ORI, EORI to CCR 000013B6 4280 1724 U09 CLR.L D0 000013B8 18FC 002E 1725 MOVE.B #'.',(A4)+ 000013BC 18FC 0042 1726 MOVE.B #'B',(A4)+ 000013C0 287C 0000FF46 1727 MOVEA.L #UASMOPR,A4 000013C6 18FC 0023 1728 MOVE.B #'#',(A4)+ 000013CA 18FC 0024 1729 MOVE.B #'$',(A4)+ 000013CE 3235 6800 1730 MOVE.W 0(A5,D6.L),D1 000013D2 6100 0958 1731 BSR UGBYT 000013D6 5406 1732 ADDQ.B #2,D6 000013D8 18FC 002C 1733 MOVE.B #',',(A4)+ 000013DC 18FC 0043 1734 MOVE.B #'C',(A4)+ 000013E0 18FC 0043 1735 MOVE.B #'C',(A4)+ 000013E4 18FC 0052 1736 MOVE.B #'R',(A4)+ 000013E8 4E75 1737 RTS 000013EA 1738 ; 000013EA 1739 ; ANDI, ORI, EORI to SR 000013EA 4280 1740 U10 CLR.L D0 000013EC 18FC 002E 1741 MOVE.B #'.',(A4)+ 000013F0 18FC 0057 1742 MOVE.B #'W',(A4)+ 000013F4 183C 004C 1743 MOVE.B #'L',D4 000013F8 287C 0000FF46 1744 MOVEA.L #UASMOPR,A4 000013FE 18FC 0023 1745 MOVE.B #'#',(A4)+ 00001402 18FC 0024 1746 MOVE.B #'$',(A4)+ 00001406 3235 6800 1747 MOVE.W 0(A5,D6.L),D1 0000140A E159 1748 ROL.W #8,D1 0000140C 6100 091E 1749 BSR UGBYT 00001410 3235 6800 1750 MOVE.W 0(A5,D6.L),D1 00001414 6100 0916 1751 BSR UGBYT 00001418 5406 1752 ADDQ.B #2,D6 0000141A 18FC 002C 1753 MOVE.B #',',(A4)+ 0000141E 18FC 0053 1754 MOVE.B #'S',(A4)+ 00001422 18FC 0052 1755 MOVE.B #'R',(A4)+ 00001426 4E75 1756 RTS 00001428 1757 ; 00001428 1758 ; ADDI, ANDI, ORI, EORI, SUBI, CMPI 00001428 4280 1759 U11 CLR.L D0 0000142A 103C 0007 1760 MOVE.B #7,D0 0000142E 6100 0912 1761 BSR USZ 00001432 287C 0000FF46 1762 MOVEA.L #UASMOPR,A4 00001438 18FC 0023 1763 MOVE.B #'#',(A4)+ 0000143C 18FC 0024 1764 MOVE.B #'$',(A4)+ 00001440 0C04 0042 1765 CMPI.B #'B',D4 00001444 660C 1766 BNE.S U11_01 00001446 3235 6800 1767 MOVE.W 0(A5,D6.L),D1 0000144A 6100 08E0 1768 BSR UGBYT 0000144E 5406 1769 ADDQ.B #2,D6 00001450 6042 1770 BRA.S U11_03 00001452 0C04 0057 1771 U11_01 CMPI.B #'W',D4 00001456 6616 1772 BNE.S U11_02 00001458 3235 6800 1773 MOVE.W 0(A5,D6.L),D1 0000145C E159 1774 ROL.W #8,D1 0000145E 6100 08CC 1775 BSR UGBYT 00001462 3235 6800 1776 MOVE.W 0(A5,D6.L),D1 00001466 6100 08C4 1777 BSR UGBYT 0000146A 5406 1778 ADDQ.B #2,D6 0000146C 6026 1779 BRA.S U11_03 0000146E 3235 6800 1780 U11_02 MOVE.W 0(A5,D6.L),D1 00001472 E159 1781 ROL.W #8,D1 00001474 6100 08B6 1782 BSR UGBYT 00001478 3235 6800 1783 MOVE.W 0(A5,D6.L),D1 0000147C 6100 08AE 1784 BSR UGBYT 00001480 3235 6802 1785 MOVE.W 2(A5,D6.L),D1 00001484 E159 1786 ROL.W #8,D1 00001486 6100 08A4 1787 BSR UGBYT 0000148A 3235 6802 1788 MOVE.W 2(A5,D6.L),D1 0000148E 6100 089C 1789 BSR UGBYT 00001492 5806 1790 ADDQ.B #4,D6 00001494 18FC 002C 1791 U11_03 MOVE.B #',',(A4)+ 00001498 6100 0602 1792 BSR UEA 0000149C 4E75 1793 RTS 0000149E 1794 ; 0000149E 1795 ; BRA, BSR 0000149E 4280 1796 U12 CLR.L D0 000014A0 0C05 0000 1797 CMPI.B #0,D5 000014A4 6708 1798 BEQ.S U12_00 000014A6 18FC 002E 1799 MOVE.B #'.',(A4)+ 000014AA 18FC 0053 1800 MOVE.B #'S',(A4)+ 000014AE 287C 0000FF46 1801 U12_00 MOVEA.L #UASMOPR,A4 000014B4 18FC 0024 1802 MOVE.B #'$',(A4)+ 000014B8 220D 1803 MOVE.L A5,D1 000014BA 5481 1804 ADDQ.L #2,D1 000014BC 0C05 0000 1805 CMPI.B #0,D5 000014C0 670C 1806 BEQ.S U12_01 000014C2 0C05 00FF 1807 CMPI.B #$FF,D5 000014C6 6710 1808 BEQ.S U12_02 000014C8 1005 1809 MOVE.B D5,D0 000014CA D200 1810 ADD.B D0,D1 000014CC 6012 1811 BRA.S U12_03 000014CE 3035 6800 1812 U12_01 MOVE.W 0(A5,D6.L),D0 000014D2 D240 1813 ADD.W D0,D1 000014D4 5406 1814 ADDQ.B #2,D6 000014D6 6008 1815 BRA.S U12_03 000014D8 2035 6800 1816 U12_02 MOVE.L 0(A5,D6.L),D0 000014DC D280 1817 ADD.L D0,D1 000014DE 5806 1818 ADDQ.B #4,D6 000014E0 103C 0004 1819 U12_03 MOVE.B #4,D0 000014E4 E199 1820 U12_04 ROL.L #8,D1 000014E6 6100 0844 1821 BSR UGBYT 000014EA 5300 1822 SUBQ.B #1,D0 000014EC 66F6 1823 BNE.S U12_04 000014EE 4E75 1824 RTS 000014F0 1825 ; 000014F0 1826 ; JMP, JSR 000014F0 287C 0000FF46 1827 U13 MOVEA.L #UASMOPR,A4 000014F6 6100 05A4 1828 BSR UEA 000014FA 4E75 1829 RTS 000014FC 1830 ; 000014FC 1831 ; BTST, BCHG, BCLR, BSET immediate data. These don't 000014FC 1832 ; need .B or .L. If the destination is a data register 000014FC 1833 ; then it's automatically .L, otherwise it's always .B 000014FC 183C 0042 1834 U14 MOVE.B #'B',D4 00001500 287C 0000FF46 1835 MOVEA.L #UASMOPR,A4 00001506 18FC 0023 1836 MOVE.B #'#',(A4)+ 0000150A 18FC 0024 1837 MOVE.B #'$',(A4)+ 0000150E 3235 6800 1838 MOVE.W 0(A5,D6.L),D1 00001512 6100 0818 1839 BSR UGBYT ;Change imm data to ASCII & store 00001516 5406 1840 ADDQ.B #2,D6 00001518 18FC 002C 1841 MOVE.B #',',(A4)+ 0000151C 6100 057E 1842 BSR UEA 00001520 4E75 1843 RTS 00001522 1844 ; 00001522 1845 ; BTST, BCHG, BCLR, BSET 00001522 1846 ; register data 00001522 4280 1847 U15 CLR.L D0 00001524 183C 004C 1848 MOVE.B #'L',D4 00001528 287C 0000FF46 1849 MOVEA.L #UASMOPR,A4 0000152E 18FC 0044 1850 MOVE.B #'D',(A4)+ 00001532 103C 000B 1851 MOVE.B #11,D0 00001536 6100 07DA 1852 BSR UREG 0000153A 18FC 002C 1853 MOVE.B #',',(A4)+ 0000153E 6100 055C 1854 BSR UEA 00001542 4E75 1855 RTS 00001544 1856 ; 00001544 1857 ; MOVE 00001544 4280 1858 U16 CLR.L D0 00001546 103C 000D 1859 MOVE.B #13,D0 0000154A 6100 082A 1860 BSR USZM 0000154E 287C 0000FF46 1861 MOVEA.L #UASMOPR,A4 00001554 6100 0546 1862 BSR UEA 00001558 18FC 002C 1863 MOVE.B #',',(A4)+ 0000155C 2F05 1864 MOVE.L D5,-(A7) ;<<< these lines 0000155E 3005 1865 MOVE.W D5,D0 ;flip destination addr. 00001560 EF5D 1866 ROL.W #7,D5 ;RRRMMM to MMMRRR format 00001562 CA7C 0007 1867 AND.W #7,D5 ;in EA location 00001566 E658 1868 ROR.W #3,D0 00001568 0240 0038 1869 ANDI.W #$38,D0 0000156C DA40 1870 ADD.W D0,D5 0000156E 6100 052C 1871 BSR UEA ;<<<< end flip 00001572 2A1F 1872 MOVE.L (A7)+,D5 ;get back D5 00001574 4E75 1873 RTS 00001576 1874 ; 00001576 1875 ; MOVEA 00001576 4280 1876 U17 CLR.L D0 00001578 103C 000D 1877 MOVE.B #13,D0 0000157C 6100 07F8 1878 BSR USZM 00001580 287C 0000FF46 1879 MOVEA.L #UASMOPR,A4 00001586 6100 0514 1880 BSR UEA 0000158A 18FC 002C 1881 MOVE.B #',',(A4)+ 0000158E 18FC 0041 1882 MOVE.B #'A',(A4)+ 00001592 103C 000B 1883 MOVE.B #11,D0 00001596 6100 077A 1884 BSR UREG 0000159A 4E75 1885 RTS 0000159C 1886 ; 0000159C 1887 ; Bcc 0000159C 7008 1888 U18 MOVE.L #8,D0 0000159E 6100 080A 1889 BSR UCC 000015A2 6100 FEFA 1890 BSR U12 ;bsr routine 000015A6 4E75 1891 RTS 000015A8 1892 ; 000015A8 1893 ; DBcc 000015A8 7008 1894 U19 MOVE.L #8,D0 000015AA 6100 07FE 1895 BSR UCC 000015AE 287C 0000FF46 1896 MOVEA.L #UASMOPR,A4 000015B4 18FC 0044 1897 MOVE.B #'D',(A4)+ 000015B8 103C 0002 1898 MOVE.B #2,D0 000015BC 6100 0754 1899 BSR UREG 000015C0 18FC 002C 1900 MOVE.B #',',(A4)+ 000015C4 18FC 0024 1901 MOVE.B #'$',(A4)+ 000015C8 220D 1902 MOVE.L A5,D1 000015CA 5481 1903 ADDQ.L #2,D1 000015CC 3035 6800 1904 MOVE.W 0(A5,D6.L),D0 000015D0 D240 1905 ADD.W D0,D1 000015D2 5406 1906 ADDQ.B #2,D6 000015D4 103C 0004 1907 MOVE.B #4,D0 000015D8 E199 1908 U19_01 ROL.L #8,D1 000015DA 6100 0750 1909 BSR UGBYT 000015DE 5300 1910 SUBQ.B #1,D0 000015E0 66F6 1911 BNE.S U19_01 000015E2 4E75 1912 RTS 000015E4 1913 ; 000015E4 1914 ; Scc 000015E4 7008 1915 U20 MOVE.L #8,D0 000015E6 6100 07C2 1916 BSR UCC 000015EA 183C 0042 1917 MOVE.B #'B',D4 000015EE 287C 0000FF46 1918 MOVEA.L #UASMOPR,A4 000015F4 183C 0042 1919 MOVE.B #'B',D4 000015F8 6100 04A2 1920 BSR UEA 000015FC 4E75 1921 RTS 000015FE 1922 ; 000015FE 1923 ; NEGX, CLR, NEG, NOT, TST 000015FE 4280 1924 U21 CLR.L D0 00001600 103C 0007 1925 MOVE.B #7,D0 00001604 6100 073C 1926 BSR USZ 00001608 287C 0000FF46 1927 MOVEA.L #UASMOPR,A4 0000160E 6100 048C 1928 BSR UEA 00001612 4E75 1929 RTS 00001614 1930 ; 00001614 1931 ; TAS 00001614 4280 1932 U22 CLR.L D0 00001616 183C 0042 1933 MOVE.B #'B',D4 0000161A 287C 0000FF46 1934 MOVEA.L #UASMOPR,A4 00001620 6100 047A 1935 BSR UEA 00001624 4E75 1936 RTS 00001626 1937 ; 00001626 1938 ; SWAP 00001626 4280 1939 U23 CLR.L D0 00001628 287C 0000FF46 1940 MOVEA.L #UASMOPR,A4 0000162E 18FC 0044 1941 MOVE.B #'D',(A4)+ 00001632 103C 0002 1942 MOVE.B #2,D0 00001636 6100 06DA 1943 BSR UREG 0000163A 4E75 1944 RTS 0000163C 1945 ; 0000163C 1946 ; UNLK 0000163C 4280 1947 U24 CLR.L D0 0000163E 287C 0000FF46 1948 MOVEA.L #UASMOPR,A4 00001644 18FC 0041 1949 MOVE.B #'A',(A4)+ 00001648 103C 0002 1950 MOVE.B #2,D0 0000164C 6100 06C4 1951 BSR UREG 00001650 4E75 1952 RTS 00001652 1953 ; 00001652 1954 ; LINK 00001652 287C 0000FF46 1955 U25 MOVEA.L #UASMOPR,A4 00001658 18FC 0041 1956 MOVE.B #'A',(A4)+ 0000165C 103C 000B 1957 MOVE.B #11,D0 00001660 6100 06B0 1958 BSR UREG 00001664 18FC 002C 1959 MOVE.B #',',(A4)+ 00001668 18FC 0023 1960 MOVE.B #'#',(A4)+ 0000166C 18FC 0024 1961 MOVE.B #'$',(A4)+ 00001670 3235 6800 1962 MOVE.W 0(A5,D6.L),D1 00001674 5406 1963 ADDQ.B #2,D6 00001676 103C 0002 1964 MOVE.B #2,D0 0000167A E159 1965 U25_01 ROL.W #8,D1 0000167C 6100 06AE 1966 BSR UGBYT 00001680 5300 1967 SUBQ.B #1,D0 00001682 66F6 1968 BNE.S U25_01 00001684 4E75 1969 RTS 00001686 1970 ; 00001686 1971 ; ABCD, SBCD 00001686 4280 1972 U26 CLR.L D0 ;Mnemonic is already in buffer 00001688 287C 0000FF46 1973 MOVEA.L #UASMOPR,A4 ;A4 -> to argument storage 0000168E 0805 0003 1974 BTST #3,D5 ;D5 contains the hex opcode 00001692 6624 1975 BNE.S U26_01 00001694 287C 0000FF46 1976 MOVEA.L #UASMOPR,A4 0000169A 18FC 0044 1977 MOVE.B #'D',(A4)+ 0000169E 103C 0002 1978 MOVE.B #2,D0 000016A2 6100 066E 1979 BSR UREG 000016A6 18FC 002C 1980 MOVE.B #',',(A4)+ 000016AA 18FC 0044 1981 MOVE.B #'D',(A4)+ 000016AE 103C 000B 1982 MOVE.B #11,D0 000016B2 6100 065E 1983 BSR UREG 000016B6 6034 1984 BRA.S U26_02 000016B8 18FC 002D 1985 U26_01 MOVE.B #'-',(A4)+ 000016BC 18FC 0028 1986 MOVE.B #'(',(A4)+ 000016C0 18FC 0041 1987 MOVE.B #'A',(A4)+ 000016C4 103C 0002 1988 MOVE.B #02,D0 000016C8 6100 0648 1989 BSR UREG 000016CC 18FC 0029 1990 MOVE.B #')',(A4)+ 000016D0 18FC 002C 1991 MOVE.B #',',(A4)+ 000016D4 18FC 002D 1992 MOVE.B #'-',(A4)+ 000016D8 18FC 0028 1993 MOVE.B #'(',(A4)+ 000016DC 18FC 0041 1994 MOVE.B #'A',(A4)+ 000016E0 103C 000B 1995 MOVE.B #11,D0 000016E4 6100 062C 1996 BSR UREG 000016E8 18FC 0029 1997 MOVE.B #')',(A4)+ 000016EC 4E75 1998 U26_02 RTS 000016EE 1999 ; 000016EE 2000 ; ADDQ, SUBQ 000016EE 4280 2001 U27 CLR.L D0 000016F0 103C 0007 2002 MOVE.B #7,D0 000016F4 6100 064C 2003 BSR USZ 000016F8 287C 0000FF46 2004 MOVEA.L #UASMOPR,A4 000016FE 18FC 0023 2005 MOVE.B #'#',(A4)+ 00001702 18FC 0024 2006 MOVE.B #'$',(A4)+ 00001706 2F05 2007 MOVE.L D5,-(A7) ;get back D5 00001708 EF5D 2008 ROL.W #7,D5 0000170A CA7C 0007 2009 AND.W #7,D5 0000170E 0605 0030 2010 ADDI.B #$30,D5 00001712 18C5 2011 MOVE.B D5,(A4)+ 00001714 2A1F 2012 MOVE.L (A7)+,D5 ;get back D5 00001716 18FC 002C 2013 MOVE.B #',',(A4)+ 0000171A 6100 0380 2014 BSR UEA 0000171E 4E75 2015 RTS 00001720 2016 ; 00001720 2017 ; CHK 00001720 4280 2018 U28 CLR.L D0 00001722 183C 0057 2019 MOVE.B #'W',D4 00001726 287C 0000FF46 2020 MOVEA.L #UASMOPR,A4 0000172C 6100 036E 2021 BSR UEA 00001730 18FC 002C 2022 MOVE.B #',',(A4)+ 00001734 18FC 0044 2023 MOVE.B #'D',(A4)+ 00001738 103C 000B 2024 MOVE.B #11,D0 0000173C 6100 05D4 2025 BSR UREG 00001740 4E75 2026 RTS 00001742 2027 ; 00001742 2028 ; EXG Dn,Dm. It's always long. 00001742 4280 2029 U29DD CLR.L D0 00001744 287C 0000FF46 2030 MOVEA.L #UASMOPR,A4 0000174A 18FC 0044 2031 MOVE.B #'D',(A4)+ 0000174E 103C 000B 2032 MOVE.B #11,D0 00001752 6100 05BE 2033 BSR UREG 00001756 18FC 002C 2034 MOVE.B #',',(A4)+ 0000175A 18FC 0044 2035 MOVE.B #'D',(A4)+ 0000175E 103C 0002 2036 MOVE.B #2,D0 00001762 6100 05AE 2037 BSR UREG 00001766 4E75 2038 RTS 00001768 2039 ; 00001768 2040 ; EXG An,Am. It's always long. 00001768 4280 2041 U29AA CLR.L D0 0000176A 287C 0000FF46 2042 MOVEA.L #UASMOPR,A4 00001770 18FC 0041 2043 MOVE.B #'A',(A4)+ 00001774 103C 000B 2044 MOVE.B #11,D0 00001778 6100 0598 2045 BSR UREG 0000177C 18FC 002C 2046 MOVE.B #',',(A4)+ 00001780 18FC 0041 2047 MOVE.B #'A',(A4)+ 00001784 103C 0002 2048 MOVE.B #2,D0 00001788 6100 0588 2049 BSR UREG 0000178C 4E75 2050 RTS 0000178E 2051 ; 0000178E 2052 ; EXG. It's always long. 0000178E 4280 2053 U29DA CLR.L D0 00001790 287C 0000FF46 2054 MOVEA.L #UASMOPR,A4 00001796 18FC 0044 2055 MOVE.B #'D',(A4)+ 0000179A 103C 000B 2056 MOVE.B #11,D0 0000179E 6100 0572 2057 BSR UREG 000017A2 18FC 002C 2058 MOVE.B #',',(A4)+ 000017A6 18FC 0041 2059 MOVE.B #'A',(A4)+ 000017AA 103C 0002 2060 MOVE.B #2,D0 000017AE 6100 0562 2061 BSR UREG 000017B2 4E75 2062 RTS 000017B4 2063 ; 000017B4 2064 ; EXT 000017B4 4280 2065 U30 CLR.L D0 000017B6 18FC 002E 2066 MOVE.B #'.',(A4)+ 000017BA 0805 0006 2067 BTST #6,D5 000017BE 6706 2068 BEQ.S U30_01 000017C0 18FC 004C 2069 MOVE.B #'L',(A4)+ 000017C4 6004 2070 BRA.S U30_02 000017C6 18FC 0057 2071 U30_01 MOVE.B #'W',(A4)+ 000017CA 287C 0000FF46 2072 U30_02 MOVEA.L #UASMOPR,A4 000017D0 18FC 0044 2073 MOVE.B #'D',(A4)+ 000017D4 103C 0002 2074 MOVE.B #2,D0 000017D8 6100 0538 2075 BSR UREG 000017DC 4E75 2076 RTS 000017DE 2077 ; 000017DE 2078 ; LEA 000017DE 4280 2079 U31 CLR.L D0 000017E0 18FC 002E 2080 MOVE.B #'.',(A4)+ 000017E4 2081 ; D5 contains the instruction word 000017E4 0805 0000 2082 BTST #0,D5 000017E8 660A 2083 BNE.S U31A 000017EA 18FC 0057 2084 MOVE.B #'W',(A4)+ 000017EE 183C 0057 2085 MOVE.B #'W',D4 000017F2 6008 2086 BRA.S U31B 000017F4 18FC 004C 2087 U31A MOVE.B #'L',(A4)+ 000017F8 183C 004C 2088 MOVE.B #'L',D4 000017FC 287C 0000FF46 2089 U31B MOVEA.L #UASMOPR,A4 00001802 6100 0298 2090 BSR UEA 00001806 18FC 002C 2091 MOVE.B #',',(A4)+ 0000180A 18FC 0041 2092 MOVE.B #'A',(A4)+ 0000180E 103C 000B 2093 MOVE.B #11,D0 00001812 6100 04FE 2094 BSR UREG 00001816 4E75 2095 RTS 00001818 2096 ; 00001818 2097 ; NBCD 00001818 183C 0042 2098 U32 MOVE.B #'B',D4 0000181C 287C 0000FF46 2099 MOVEA.L #UASMOPR,A4 00001822 6100 0278 2100 BSR UEA 00001826 4E75 2101 RTS 00001828 2102 ; 00001828 2103 ; PEA 00001828 183C 004C 2104 U33 MOVE.B #'L',D4 0000182C 287C 0000FF46 2105 MOVEA.L #UASMOPR,A4 00001832 6100 0268 2106 BSR UEA 00001836 4E75 2107 RTS 00001838 2108 ; 00001838 2109 ; STOP 00001838 287C 0000FF46 2110 U34 MOVEA.L #UASMOPR,A4 0000183E 18FC 0023 2111 MOVE.B #'#',(A4)+ 00001842 18FC 0024 2112 MOVE.B #'$',(A4)+ 00001846 3235 6800 2113 MOVE.W $00(A5,D6.L),D1 0000184A E159 2114 ROL.W #8,D1 0000184C 6100 04DE 2115 BSR UGBYT 00001850 3235 6800 2116 MOVE.W 0(A5,D6.L),D1 00001854 6100 04D6 2117 BSR UGBYT 00001858 5406 2118 ADDQ.B #2,D6 0000185A 4E75 2119 RTS 0000185C 2120 ; 0000185C 2121 ; TRAP 0000185C 287C 0000FF46 2122 U35 MOVEA.L #UASMOPR,A4 00001862 18FC 0023 2123 MOVE.B #'#',(A4)+ 00001866 18FC 0024 2124 MOVE.B #'$',(A4)+ 0000186A 1205 2125 MOVE.B D5,D1 0000186C 6100 F1EE 2126 BSR NUM_ASC 00001870 18C1 2127 MOVE.B D1,(A4)+ 00001872 4E75 2128 RTS 00001874 2129 ; 00001874 2130 ; MOVE TO CCR 00001874 18FC 002E 2131 U36 MOVE.B #'.',(A4)+ 00001878 18FC 0057 2132 MOVE.B #'W',(A4)+ 0000187C 183C 0057 2133 MOVE.B #'W',D4 00001880 287C 0000FF46 2134 MOVEA.L #UASMOPR,A4 00001886 6100 0214 2135 BSR UEA 0000188A 18FC 002C 2136 MOVE.B #',',(A4)+ 0000188E 18FC 0043 2137 MOVE.B #'C',(A4)+ 00001892 18FC 0043 2138 MOVE.B #'C',(A4)+ 00001896 18FC 0052 2139 MOVE.B #'R',(A4)+ 0000189A 4E75 2140 RTS 0000189C 2141 ; 0000189C 2142 ; MOVE from SR 0000189C 18FC 002E 2143 U37 MOVE.B #'.',(A4)+ 000018A0 18FC 0057 2144 MOVE.B #'W',(A4)+ 000018A4 183C 0057 2145 MOVE.B #'W',D4 000018A8 287C 0000FF46 2146 MOVEA.L #UASMOPR,A4 000018AE 18FC 0053 2147 MOVE.B #'S',(A4)+ 000018B2 18FC 0052 2148 MOVE.B #'R',(A4)+ 000018B6 18FC 002C 2149 MOVE.B #',',(A4)+ 000018BA 6100 01E0 2150 BSR UEA 000018BE 4E75 2151 RTS 000018C0 2152 ; 000018C0 2153 ; MOVE to SR 000018C0 18FC 002E 2154 U38 MOVE.B #'.',(A4)+ 000018C4 18FC 0057 2155 MOVE.B #'W',(A4)+ 000018C8 183C 0057 2156 MOVE.B #'W',D4 000018CC 287C 0000FF46 2157 MOVEA.L #UASMOPR,A4 000018D2 6100 01C8 2158 BSR UEA 000018D6 18FC 002C 2159 MOVE.B #',',(A4)+ 000018DA 18FC 0053 2160 MOVE.B #'S',(A4)+ 000018DE 18FC 0052 2161 MOVE.B #'R',(A4)+ 000018E2 4E75 2162 RTS 000018E4 2163 ; 000018E4 2164 ; MOVE An <-> USP 000018E4 18FC 002E 2165 U39 MOVE.B #'.',(A4)+ 000018E8 18FC 004C 2166 MOVE.B #'L',(A4)+ 000018EC 287C 0000FF46 2167 MOVEA.L #UASMOPR,A4 000018F2 0805 0003 2168 BTST #3,D5 000018F6 671E 2169 BEQ.S U39_01 000018F8 18FC 0055 2170 MOVE.B #'U',(A4)+ 000018FC 18FC 0053 2171 MOVE.B #'S',(A4)+ 00001900 18FC 0050 2172 MOVE.B #'P',(A4)+ 00001904 18FC 002C 2173 MOVE.B #',',(A4)+ 00001908 18FC 0041 2174 MOVE.B #'A',(A4)+ 0000190C 103C 0002 2175 MOVE.B #2,D0 00001910 6100 0400 2176 BSR UREG 00001914 601C 2177 BRA.S U39_02 00001916 18FC 0041 2178 U39_01 MOVE.B #'A',(A4)+ 0000191A 103C 0002 2179 MOVE.B #2,D0 0000191E 6100 03F2 2180 BSR UREG 00001922 18FC 002C 2181 MOVE.B #',',(A4)+ 00001926 18FC 0055 2182 MOVE.B #'U',(A4)+ 0000192A 18FC 0053 2183 MOVE.B #'S',(A4)+ 0000192E 18FC 0050 2184 MOVE.B #'P',(A4)+ 00001932 4E75 2185 U39_02 RTS 00001934 2186 ; 00001934 2187 ; MOVEQ 00001934 18FC 002E 2188 U40 MOVE.B #'.',(A4)+ 00001938 18FC 004C 2189 MOVE.B #'L',(A4)+ 0000193C 287C 0000FF46 2190 MOVEA.L #UASMOPR,A4 00001942 18FC 0023 2191 MOVE.B #'#',(A4)+ 00001946 18FC 0024 2192 MOVE.B #'$',(A4)+ 0000194A 1205 2193 MOVE.B D5,D1 0000194C 6100 03DE 2194 BSR UGBYT 00001950 18FC 002C 2195 MOVE.B #',',(A4)+ 00001954 18FC 0044 2196 MOVE.B #'D',(A4)+ 00001958 103C 000B 2197 MOVE.B #11,D0 0000195C 6100 03B4 2198 BSR UREG 00001960 4E75 2199 RTS 00001962 2200 ; 00001962 2201 ; MOVEP 00001962 0805 0006 2202 U41 BTST #6,D5 00001966 670A 2203 BEQ.S U41_01 00001968 18FC 002E 2204 MOVE.B #'.',(A4)+ 0000196C 18FC 004C 2205 MOVE.B #'L',(A4)+ 00001970 6008 2206 BRA.S U41_02 00001972 18FC 002E 2207 U41_01 MOVE.B #'.',(A4)+ 00001976 18FC 0057 2208 MOVE.B #'W',(A4)+ 0000197A 287C 0000FF46 2209 U41_02 MOVEA.L #UASMOPR,A4 00001980 0805 0007 2210 BTST #7,D5 00001984 6716 2211 BEQ.S U41_03 ;If 0 then it's d(Ay),Dx 00001986 18FC 0044 2212 MOVE.B #'D',(A4)+ ;It's 1 so do Dx,d(Ay) 0000198A 103C 000B 2213 MOVE.B #11,D0 ;point to bit 11 and put in 0000198E 6100 0382 2214 BSR UREG ;place the data register # 00001992 18FC 002C 2215 MOVE.B #',',(A4)+ 00001996 6100 001A 2216 BSR DOIT 0000199A 6014 2217 BRA.S U41_04 0000199C 6100 0014 2218 U41_03 BSR DOIT 000019A0 18FC 002C 2219 MOVE.B #',',(A4)+ 000019A4 18FC 0044 2220 MOVE.B #'D',(A4)+ 000019A8 103C 000B 2221 MOVE.B #11,D0 000019AC 6100 0364 2222 BSR UREG 000019B0 4E75 2223 U41_04 RTS 000019B2 2224 ; 000019B2 18FC 0024 2225 DOIT MOVE.B #'$',(A4)+ 000019B6 3235 6800 2226 MOVE.W $00(A5,D6.L),D1 000019BA E159 2227 ROL.W #8,D1 000019BC 6100 036E 2228 BSR UGBYT 000019C0 3235 6800 2229 MOVE.W 0(A5,D6.L),D1 000019C4 6100 0366 2230 BSR UGBYT 000019C8 5406 2231 ADDQ.B #2,D6 000019CA 18FC 0028 2232 MOVE.B #'(',(A4)+ 000019CE 18FC 0041 2233 MOVE.B #'A',(A4)+ 000019D2 7002 2234 MOVEQ #2,D0 000019D4 6100 033C 2235 BSR UREG 000019D8 18FC 0029 2236 MOVE.B #')',(A4)+ 000019DC 4E75 2237 RTS 000019DE 2238 ; 000019DE 2239 ; MOVEM 000019DE 0805 0006 2240 U42 BTST #6,D5 000019E2 670A 2241 BEQ.S U42_01 000019E4 18FC 002E 2242 MOVE.B #'.',(A4)+ 000019E8 18FC 004C 2243 MOVE.B #'L',(A4)+ 000019EC 6008 2244 BRA.S U42_02 000019EE 18FC 002E 2245 U42_01 MOVE.B #'.',(A4)+ 000019F2 18FC 0057 2246 MOVE.B #'W',(A4)+ 000019F6 287C 0000FF46 2247 U42_02 MOVEA.L #UASMOPR,A4 000019FC 362D 0002 2248 MOVE.W 2(A5),D3 00001A00 0805 0005 2249 U42_03 BTST #5,D5 00001A04 6726 2250 BEQ.S U42_04 00001A06 0805 0004 2251 BTST #4,D5 00001A0A 6620 2252 BNE.S U42_04 00001A0C 0805 0003 2253 BTST #3,D5 00001A10 661A 2254 BNE.S U42_04 00001A12 4280 2255 CLR.L D0 00001A14 4282 2256 CLR.L D2 00001A16 323C 000F 2257 MOVE.W #$F,D1 00001A1A 0303 2258 U42_06 BTST D1,D3 00001A1C 6702 2259 BEQ.S U42_05 00001A1E 01C2 2260 BSET D0,D2 00001A20 5200 2261 U42_05 ADDQ.B #1,D0 00001A22 5301 2262 SUBQ.B #1,D1 00001A24 0C00 000F 2263 CMPI.B #$F,D0 00001A28 6FF0 2264 BLE.S U42_06 00001A2A 3602 2265 MOVE.W D2,D3 00001A2C 103C 000A 2266 U42_04 MOVE.B #10,D0 00001A30 0105 2267 BTST D0,D5 00001A32 6734 2268 BEQ.S U42_07 00001A34 6100 0066 2269 BSR UEA 00001A38 18FC 002C 2270 MOVE.B #',',(A4)+ 00001A3C 143C 0044 2271 MOVE.B #'D',D2 00001A40 5406 2272 ADDQ.B #2,D6 00001A42 6100 0384 2273 BSR UM 00001A46 3203 2274 MOVE.W D3,D1 00001A48 E15B 2275 ROL.W #8,D3 00001A4A 0C41 0100 2276 CMPI.W #$100,D1 00001A4E 6D0E 2277 BLT.S U42_10 00001A50 C27C 00FF 2278 AND.W #$FF,D1 00001A54 0C41 0001 2279 CMPI.W #1,D1 00001A58 6D04 2280 BLT.S U42_10 00001A5A 18FC 002F 2281 MOVE.B #'/',(A4)+ 00001A5E 143C 0041 2282 U42_10 MOVE.B #'A',D2 00001A62 6100 0364 2283 BSR UM 00001A66 6032 2284 BRA.S U42_08 00001A68 143C 0044 2285 U42_07 MOVE.B #'D',D2 00001A6C 5406 2286 ADDQ.B #2,D6 00001A6E 6100 0358 2287 BSR UM 00001A72 3203 2288 MOVE.W D3,D1 00001A74 E15B 2289 ROL.W #8,D3 00001A76 0C41 0100 2290 CMPI.W #$100,D1 00001A7A 6D0E 2291 BLT.S U42_09 00001A7C C27C 00FF 2292 AND.W #$FF,D1 00001A80 0C41 0001 2293 CMPI.W #1,D1 00001A84 6D04 2294 BLT.S U42_09 00001A86 18FC 002F 2295 MOVE.B #'/',(A4)+ 00001A8A 143C 0041 2296 U42_09 MOVE.B #'A',D2 00001A8E 6100 0338 2297 BSR UM 00001A92 18FC 002C 2298 MOVE.B #',',(A4)+ 00001A96 6100 0004 2299 BSR UEA 00001A9A 4E75 2300 U42_08 RTS 00001A9C 2301 ; 00001A9C 2302 ; Tests effective address field 00001A9C 2303 ; D0 points to first bit of 00001A9C 2304 ; D4.B is length of cmd 'B','W','L' 00001A9C 2305 ; moves result to cmd line (A4) 00001A9C 2306 ; format MMMRRR 00001A9C 4280 2307 UEA CLR.L D0 00001A9E 103C 0005 2308 MOVE.B #05,D0 00001AA2 0105 2309 BTST D0,D5 ;check first bit XMM 00001AA4 6700 0212 2310 BEQ UEA0 ;is 0MM, jmp 00001AA8 5300 2311 SUBQ.B #1,D0 00001AAA 0105 2312 BTST D0,D5 ;check second bit 1XM 00001AAC 6700 01C0 2313 BEQ UEA1 ;is 10M, jmp 00001AB0 5300 2314 SUBQ.B #1,D0 00001AB2 0105 2315 BTST D0,D5 ;check third bit 11X 00001AB4 6700 0156 2316 BEQ UEA2 ;is 110, jmp 00001AB8 5300 2317 SUBQ.B #1,D0 ;<<<<<<<< 111-RRR 00001ABA 0105 2318 BTST D0,D5 ;test register bits 00001ABC 6764 2319 BEQ.S UEA7 ;is 0RR, jmp 00001ABE 18FC 0023 2320 MOVE.B #'#',(A4)+ ;<<<<<<<< 111-100 # 00001AC2 18FC 0024 2321 MOVE.B #'$',(A4)+ 00001AC6 0C04 0042 2322 CMPI.B #'B',D4 00001ACA 660E 2323 BNE.S UEA11 00001ACC 322D 0002 2324 MOVE.W 2(A5),D1 00001AD0 6100 025A 2325 BSR UGBYT 00001AD4 5406 2326 ADDQ.B #2,D6 00001AD6 6000 0238 2327 BRA UEAD ;go to RTS 00001ADA 2328 ; 00001ADA 0C04 0057 2329 UEA11 CMPI.B #'W',D4 00001ADE 6618 2330 BNE.S UEA12 00001AE0 3235 6800 2331 MOVE.W 0(A5,D6.L),D1 00001AE4 E159 2332 ROL.W #8,D1 00001AE6 6100 0244 2333 BSR UGBYT 00001AEA 3235 6800 2334 MOVE.W 0(A5,D6.L),D1 00001AEE 6100 023C 2335 BSR UGBYT 00001AF2 5406 2336 ADDQ.B #2,D6 00001AF4 6000 021A 2337 BRA UEAD 00001AF8 3235 6800 2338 UEA12 MOVE.W $00(A5,D6.L),D1 00001AFC E159 2339 ROL.W #8,D1 00001AFE 6100 022C 2340 BSR UGBYT 00001B02 3235 6800 2341 MOVE.W 0(A5,D6.L),D1 00001B06 6100 0224 2342 BSR UGBYT 00001B0A 3235 6802 2343 MOVE.W 2(A5,D6.L),D1 00001B0E E159 2344 ROL.W #8,D1 00001B10 6100 021A 2345 BSR UGBYT 00001B14 3235 6802 2346 MOVE.W 2(A5,D6.L),D1 00001B18 6100 0212 2347 BSR UGBYT 00001B1C 5806 2348 ADDQ.B #4,D6 00001B1E 6000 01F0 2349 BRA UEAD 00001B22 2350 ; 00001B22 5300 2351 UEA7 SUBQ.B #1,D0 00001B24 0105 2352 BTST D0,D5 ;test register bits 00001B26 6700 0094 2353 BEQ UEA8 ;is 00R, jmp 00001B2A 5300 2354 SUBQ.B #1,D0 00001B2C 0105 2355 BTST D0,D5 00001B2E 6760 2356 BEQ.S UEA9 ;is 010, jmp 00001B30 18FC 0024 2357 MOVE.B #'$',(A4)+ ;<<<<<<<< 111-011 (d8,PC,Xn) 00001B34 322D 0002 2358 MOVE.W 2(A5),D1 00001B38 6100 01F2 2359 BSR UGBYT 00001B3C 5406 2360 ADDQ.B #2,D6 00001B3E 18FC 0028 2361 MOVE.B #'(',(A4)+ 00001B42 18FC 0050 2362 MOVE.B #'P',(A4)+ 00001B46 18FC 0043 2363 MOVE.B #'C',(A4)+ 00001B4A 18FC 002C 2364 MOVE.B #',',(A4)+ 00001B4E 322D 0002 2365 MOVE.W 2(A5),D1 00001B52 103C 000F 2366 MOVE.B #15,D0 00001B56 0101 2367 BTST D0,D1 00001B58 6706 2368 BEQ.S UEA17 00001B5A 18FC 0041 2369 MOVE.B #'A',(A4)+ 00001B5E 6004 2370 BRA.S UEA18 00001B60 18FC 0044 2371 UEA17 MOVE.B #'D',(A4)+ 00001B64 5300 2372 UEA18 SUBQ.B #1,D0 00001B66 2605 2373 MOVE.L D5,D3 00001B68 3A2D 0002 2374 MOVE.W 2(A5),D5 00001B6C 6100 01A4 2375 BSR UREG 00001B70 2A03 2376 MOVE.L D3,D5 00001B72 18FC 002E 2377 MOVE.B #'.',(A4)+ 00001B76 103C 000B 2378 MOVE.B #11,D0 00001B7A 0101 2379 BTST D0,D1 00001B7C 6706 2380 BEQ.S UEA19 00001B7E 18FC 004C 2381 MOVE.B #'L',(A4)+ 00001B82 6004 2382 BRA.S UEA20 00001B84 18FC 0057 2383 UEA19 MOVE.B #'W',(A4)+ 00001B88 18FC 0029 2384 UEA20 MOVE.B #')',(A4)+ 00001B8C 6000 0182 2385 BRA UEAD ;go to RTS 00001B90 2386 ; 00001B90 18FC 0024 2387 UEA9 MOVE.B #'$',(A4)+ ;<<<<<<<< 111-010 (d16,PC) 00001B94 3235 6800 2388 MOVE.W 0(A5,D6.L),D1 00001B98 E159 2389 ROL.W #8,D1 00001B9A 6100 0190 2390 BSR UGBYT 00001B9E 3235 6800 2391 MOVE.W 0(A5,D6.L),D1 00001BA2 6100 0188 2392 BSR UGBYT 00001BA6 5406 2393 ADDQ.B #2,D6 00001BA8 18FC 0028 2394 MOVE.B #'(',(A4)+ 00001BAC 18FC 0050 2395 MOVE.B #'P',(A4)+ 00001BB0 18FC 0043 2396 MOVE.B #'C',(A4)+ 00001BB4 18FC 0029 2397 MOVE.B #')',(A4)+ 00001BB8 6000 0156 2398 BRA UEAD ;go to RTS 00001BBC 2399 ; 00001BBC 5300 2400 UEA8 SUBQ.B #1,D0 00001BBE 0105 2401 BTST D0,D5 00001BC0 672E 2402 BEQ.S UEA10 ;is 000, jmp 00001BC2 18FC 0024 2403 MOVE.B #'$',(A4)+ ;<<<<<<<< 111-001 (xxx).L 00001BC6 3235 6800 2404 MOVE.W $00(A5,D6.L),D1 00001BCA E159 2405 ROL.W #8,D1 00001BCC 6100 015E 2406 BSR UGBYT 00001BD0 3235 6800 2407 MOVE.W 0(A5,D6.L),D1 00001BD4 6100 0156 2408 BSR UGBYT 00001BD8 3235 6802 2409 MOVE.W 2(A5,D6.L),D1 00001BDC E159 2410 ROL.W #8,D1 00001BDE 6100 014C 2411 BSR UGBYT 00001BE2 3235 6802 2412 MOVE.W 2(A5,D6.L),D1 00001BE6 6100 0144 2413 BSR UGBYT 00001BEA 5806 2414 ADDQ.B #4,D6 00001BEC 6000 0122 2415 BRA UEAD 00001BF0 2416 ; 00001BF0 18FC 0024 2417 UEA10 MOVE.B #'$',(A4)+ ;<<<<<<<< 111-000 (xxx).W 00001BF4 3235 6800 2418 MOVE.W 0(A5,D6.L),D1 00001BF8 E159 2419 ROL.W #8,D1 00001BFA 6100 0130 2420 BSR UGBYT 00001BFE 3235 6800 2421 MOVE.W 0(A5,D6.L),D1 00001C02 6100 0128 2422 BSR UGBYT 00001C06 5406 2423 ADDQ.B #2,D6 00001C08 6000 0106 2424 BRA UEAD 00001C0C 18FC 0024 2425 UEA2 MOVE.B #'$',(A4)+ ;<<<<<<<< 110 (d8,An,Xn) 00001C10 322D 0002 2426 MOVE.W 2(A5),D1 00001C14 6100 0116 2427 BSR UGBYT 00001C18 5406 2428 ADDQ.B #2,D6 00001C1A 18FC 0028 2429 MOVE.B #'(',(A4)+ 00001C1E 18FC 0041 2430 MOVE.B #'A',(A4)+ 00001C22 5300 2431 SUBQ.B #1,D0 00001C24 6100 00EC 2432 BSR UREG 00001C28 18FC 002C 2433 MOVE.B #',',(A4)+ 00001C2C 322D 0002 2434 MOVE.W 2(A5),D1 00001C30 103C 000F 2435 MOVE.B #15,D0 00001C34 0101 2436 BTST D0,D1 00001C36 6706 2437 BEQ.S UEA13 00001C38 18FC 0041 2438 MOVE.B #'A',(A4)+ 00001C3C 6004 2439 BRA.S UEA14 00001C3E 18FC 0044 2440 UEA13 MOVE.B #'D',(A4)+ 00001C42 5300 2441 UEA14 SUBQ.B #1,D0 00001C44 2605 2442 MOVE.L D5,D3 00001C46 3A2D 0002 2443 MOVE.W 2(A5),D5 00001C4A 6100 00C6 2444 BSR UREG 00001C4E 2A03 2445 MOVE.L D3,D5 00001C50 18FC 002E 2446 MOVE.B #'.',(A4)+ 00001C54 103C 000B 2447 MOVE.B #11,D0 00001C58 0101 2448 BTST D0,D1 00001C5A 6706 2449 BEQ.S UEA15 00001C5C 18FC 004C 2450 MOVE.B #'L',(A4)+ 00001C60 6004 2451 BRA.S UEA16 00001C62 18FC 0057 2452 UEA15 MOVE.B #'W',(A4)+ 00001C66 18FC 0029 2453 UEA16 MOVE.B #')',(A4)+ 00001C6A 6000 00A4 2454 BRA UEAD 00001C6E 2455 ; 00001C6E 5300 2456 UEA1 SUBQ.B #1,D0 00001C70 0105 2457 BTST D0,D5 ;check third bit 10X 00001C72 672C 2458 BEQ.S UEA3 ;is 100, jmp 00001C74 18FC 0024 2459 UEA1A MOVE.B #'$',(A4)+ ;<<<<<<<< 101 (d16,An) 00001C78 3235 6800 2460 MOVE.W $00(A5,D6.L),D1 00001C7C E159 2461 ROL.W #8,D1 00001C7E 6100 00AC 2462 BSR UGBYT 00001C82 3235 6800 2463 MOVE.W 0(A5,D6.L),D1 00001C86 6100 00A4 2464 BSR UGBYT 00001C8A 5406 2465 ADDQ.B #2,D6 00001C8C 18FC 0028 2466 MOVE.B #'(',(A4)+ 00001C90 18FC 0041 2467 MOVE.B #'A',(A4)+ 00001C94 5300 2468 SUBQ.B #1,D0 00001C96 6100 007A 2469 BSR UREG 00001C9A 18FC 0029 2470 MOVE.B #')',(A4)+ 00001C9E 6070 2471 BRA.S UEAD 00001CA0 2472 ; 00001CA0 18FC 002D 2473 UEA3 MOVE.B #'-',(A4)+ ;<<<<<<<< 100 -(An) 00001CA4 18FC 0028 2474 MOVE.B #'(',(A4)+ 00001CA8 18FC 0041 2475 MOVE.B #'A',(A4)+ 00001CAC 5300 2476 SUBQ.B #1,D0 00001CAE 6100 0062 2477 BSR UREG 00001CB2 18FC 0029 2478 MOVE.B #')',(A4)+ 00001CB6 6058 2479 BRA.S UEAD 00001CB8 2480 ; 00001CB8 5300 2481 UEA0 SUBQ.B #1,D0 00001CBA 0105 2482 BTST D0,D5 ;check second bit 0XM 00001CBC 6732 2483 BEQ.S UEA4 ;is 00M, jmp 00001CBE 5300 2484 SUBQ.B #1,D0 00001CC0 0105 2485 BTST D0,D5 ;check third bit 01X 00001CC2 6718 2486 BEQ.S UEA5 ;is 010, jmp 00001CC4 18FC 0028 2487 MOVE.B #'(',(A4)+ ;<<<<<<<< 011 (An)+ 00001CC8 18FC 0041 2488 MOVE.B #'A',(A4)+ 00001CCC 5300 2489 SUBQ.B #1,D0 00001CCE 6100 0042 2490 BSR UREG 00001CD2 18FC 0029 2491 MOVE.B #')',(A4)+ 00001CD6 18FC 002B 2492 MOVE.B #'+',(A4)+ 00001CDA 6034 2493 BRA.S UEAD 00001CDC 2494 ; 00001CDC 18FC 0028 2495 UEA5 MOVE.B #'(',(A4)+ ;<<<<<<<< 010 (An) 00001CE0 18FC 0041 2496 MOVE.B #'A',(A4)+ 00001CE4 5300 2497 SUBQ.B #1,D0 00001CE6 6100 002A 2498 BSR UREG 00001CEA 18FC 0029 2499 MOVE.B #')',(A4)+ 00001CEE 6020 2500 BRA.S UEAD 00001CF0 2501 ; 00001CF0 5300 2502 UEA4 SUBQ.B #1,D0 00001CF2 0105 2503 BTST D0,D5 ;check third bit 00X 00001CF4 670C 2504 BEQ.S UEA6 ;is 000, jmp 00001CF6 18FC 0041 2505 MOVE.B #'A',(A4)+ ;<<<<<<<< 001 An 00001CFA 5300 2506 SUBQ.B #1,D0 00001CFC 6100 0014 2507 BSR UREG 00001D00 600E 2508 BRA.S UEAD 00001D02 2509 ; 00001D02 18FC 0044 2510 UEA6 MOVE.B #'D',(A4)+ ;<<<<<<<< 000 Dn 00001D06 5300 2511 SUBQ.B #1,D0 00001D08 6100 0008 2512 BSR UREG 00001D0C 6000 0002 2513 BRA UEAD 00001D10 4E75 2514 UEAD RTS 00001D12 2515 ; 00001D12 2516 ; Gets the register number and adds it to printout 00001D12 2517 ; buffer. D0.B points to MSB of register in OPCODE. 00001D12 2518 ; A4 points to next place in printout buffer. 00001D12 3205 2519 UREG MOVE.W D5,D1 ;Don't trash D5 00001D14 5500 2520 SUBI.B #2,D0 ;Point D0 to lowest bit 00001D16 0280 000000FF 2521 ANDI.L #$FF,D0 ;Reset the upper 3 bytes in D0 00001D1C 6702 2522 BEQ.S UREG1 ;If shift size is 0 then skip 00001D1E E069 2523 LSR.W D0,D1 ;Shift down the register num 00001D20 0201 0007 2524 UREG1 ANDI.B #7,D1 ;Mask out irrelevant bits 00001D24 0601 0030 2525 ADDI.B #'0',D1 ;Add 30H to convert to ASCII 00001D28 18C1 2526 MOVE.B D1,(A4)+ ;Store it 00001D2A 4E75 2527 RTS 00001D2C 2528 ; 00001D2C 2529 ; Converts byte in D1.B to ASCII and moves it to 00001D2C 2530 ; cmd line 00001D2C 2401 2531 UGBYT MOVE.L D1,D2 ;init conversion reg 00001D2E E919 2532 ROL.B #4,D1 ;do upper nibble first 00001D30 6100 ED2A 2533 BSR NUM_ASC ;convert to ASCII 00001D34 18C1 2534 MOVE.B D1,(A4)+ 00001D36 2202 2535 MOVE.L D2,D1 ;now do lower nibble 00001D38 6100 ED22 2536 BSR NUM_ASC 00001D3C 18C1 2537 MOVE.B D1,(A4)+ 00001D3E 2202 2538 MOVE.L D2,D1 00001D40 4E75 2539 RTS 00001D42 2540 ; 00001D42 2541 ; cmd size. 00=byte 01=word 10=long 00001D42 2542 ; moves .B, .W or .L to cmd line 00001D42 2543 ; D0 points to first size bit 00001D42 2544 ; also moves L or W or B to D4 00001D42 0105 2545 USZ BTST D0,D5 00001D44 670E 2546 BEQ.S USZ1 00001D46 18FC 002E 2547 MOVE.B #'.',(A4)+ 00001D4A 18FC 004C 2548 MOVE.B #'L',(A4)+ 00001D4E 183C 004C 2549 MOVE.B #'L',D4 00001D52 6020 2550 BRA.S USZE 00001D54 5300 2551 USZ1 SUBQ.B #1,D0 00001D56 0105 2552 BTST D0,D5 00001D58 670E 2553 BEQ.S USZ2 00001D5A 18FC 002E 2554 MOVE.B #'.',(A4)+ 00001D5E 18FC 0057 2555 MOVE.B #'W',(A4)+ 00001D62 183C 0057 2556 MOVE.B #'W',D4 00001D66 600C 2557 BRA.S USZE 00001D68 18FC 002E 2558 USZ2 MOVE.B #'.',(A4)+ 00001D6C 18FC 0042 2559 MOVE.B #'B',(A4)+ 00001D70 183C 0042 2560 MOVE.B #'B',D4 00001D74 4E75 2561 USZE RTS 00001D76 2562 ; 00001D76 2563 ; cmd size for move 01=byte 11=word 10=long 00001D76 2564 ; moves .B, .W or .L to cmd line 00001D76 2565 ; D0 points to first size bit 00001D76 2566 ; also moves L or W or B to D4 00001D76 0105 2567 USZM BTST D0,D5 00001D78 660E 2568 BNE.S USZM1 00001D7A 18FC 002E 2569 MOVE.B #'.',(A4)+ 00001D7E 18FC 0042 2570 MOVE.B #'B',(A4)+ 00001D82 183C 0042 2571 MOVE.B #'B',D4 00001D86 6020 2572 BRA.S USZME 00001D88 5300 2573 USZM1 SUBQ.B #1,D0 00001D8A 0105 2574 BTST D0,D5 00001D8C 670E 2575 BEQ.S USZM2 00001D8E 18FC 002E 2576 MOVE.B #'.',(A4)+ 00001D92 18FC 0057 2577 MOVE.B #'W',(A4)+ 00001D96 183C 0057 2578 MOVE.B #'W',D4 00001D9A 600C 2579 BRA.S USZME 00001D9C 18FC 002E 2580 USZM2 MOVE.B #'.',(A4)+ 00001DA0 18FC 004C 2581 MOVE.B #'L',(A4)+ 00001DA4 183C 004C 2582 MOVE.B #'L',D4 00001DA8 4E75 2583 USZME RTS 00001DAA 2584 ; 00001DAA 2585 ; Condition codes routine 00001DAA 2586 ; D0 contains nubmber of bits to roll 00001DAA 3205 2587 UCC MOVE.W D5,D1 00001DAC E079 2588 ROR.W D0,D1 00001DAE C2BC 0000000F 2589 AND.L #$F,D1 00001DB4 C2FC 0002 2590 MULU.W #2,D1 00001DB8 207C 000024D0 2591 MOVEA.L #UCCLST,A0 00001DBE 18F0 1800 2592 MOVE.B 0(A0,D1.L),(A4)+ 00001DC2 18F0 1801 2593 MOVE.B 1(A0,D1.L),(A4)+ 00001DC6 4E75 2594 RTS 00001DC8 2595 ; 00001DC8 2596 ; <<<<<< Fixed in mon209 >>>>>> 00001DC8 2597 ; Routine for move multiple. 00001DC8 2598 ; D3 contains byte in X7-X0 format 00001DC8 2599 ; D2 contains letter (ie A,D) 00001DC8 4280 2600 UM CLR.L D0 00001DCA 123C 00FF 2601 MOVE.B #$FF,D1 00001DCE 0103 2602 UM00 BTST.L D0,D3 00001DD0 6600 000E 2603 BNE UM01 00001DD4 5200 2604 ADDI.B #$01,D0 00001DD6 0C00 0008 2605 CMPI.B #$08,D0 00001DDA 6700 0062 2606 BEQ UME 00001DDE 60EE 2607 BRA UM00 00001DE0 1200 2608 UM01 MOVE.B D0,D1 00001DE2 6100 0068 2609 BSR UMP 00001DE6 5200 2610 ADDI.B #$01,D0 00001DE8 0C00 0008 2611 CMPI.B #$08,D0 00001DEC 6700 0050 2612 BEQ UME 00001DF0 0103 2613 BTST.L D0,D3 00001DF2 6600 0010 2614 BNE UM02 00001DF6 5200 2615 ADDI.B #$01,D0 00001DF8 0C00 0008 2616 CMPI.B #$08,D0 00001DFC 6700 0040 2617 BEQ UME 00001E00 6000 0024 2618 BRA UM03 00001E04 1200 2619 UM02 MOVE.B D0,D1 00001E06 5200 2620 ADDI.B #$01,D0 00001E08 0C00 0008 2621 CMPI.B #$08,D0 00001E0C 6700 0030 2622 BEQ UME 00001E10 0103 2623 BTST.L D0,D3 00001E12 66F0 2624 BNE UM02 00001E14 18FC 002D 2625 MOVE.B #'-',(A4)+ 00001E18 6100 0032 2626 BSR UMP 00001E1C 5200 2627 ADDI.B #$01,D0 00001E1E 0C00 0008 2628 CMPI.B #$08,D0 00001E22 6700 001A 2629 BEQ UME 00001E26 0103 2630 UM03 BTST.L D0,D3 00001E28 6600 000E 2631 BNE UM04 00001E2C 5200 2632 ADDI.B #$01,D0 00001E2E 0C00 0008 2633 CMPI.B #$08,D0 00001E32 6700 000A 2634 BEQ UME 00001E36 60EE 2635 BRA UM03 00001E38 18FC 002F 2636 UM04 MOVE.B #'/',(A4)+ 00001E3C 60A2 2637 BRA UM01 00001E3E 0C01 00FF 2638 UME CMPI.B #$FF,D1 00001E42 6700 0006 2639 BEQ UME0 00001E46 6100 0004 2640 BSR UMP 00001E4A 4E75 2641 UME0 RTS 00001E4C 18C2 2642 UMP MOVE.B D2,(A4)+ 00001E4E 0601 0030 2643 ADDI.B #$30,D1 00001E52 18C1 2644 MOVE.B D1,(A4)+ 00001E54 123C 00FF 2645 MOVE.B #$FF,D1 00001E58 4E75 2646 RTS 00001E5A 2647 ; 00001E5A 2648 ;**************************************************** 00001E5A 2649 ;End Unassemble Routines 00001E5A 2650 ;**************************************************** 00001E5A 2651 ; 00001E5A 267C 00002673 2652 HELP MOVEA.L #H_MSG1,A3 ;help menu 00001E60 6100 EA30 2653 BSR PRTMSG ;now the help menu 00001E64 6000 E5A6 2654 BRA GET_CMD 00001E68 2655 ; 00001E68 6100 E80E 2656 BUSERR BSR CLR_BK ;clear the bkpts 00001E6C 267C 0000255A 2657 MOVEA.L #MSG_1,A3 00001E72 6000 011C 2658 BRA REPORT 00001E76 2659 ; 00001E76 2660 ; The address error exception stores more infomation 00001E76 2661 ; than other exceptions. 8 additonal bytes are pushed 00001E76 2662 ; to the stack before the SR and PC so a modified 00001E76 2663 ; version of REG_SAV is used. 00001E76 48F9 7FFF 0000FF90 2664 ADDERR MOVEM.L D0-D7/A0-A6,SAVREGS ;d0-a6 00001E7E 508F 2665 ADDA.L #$08,A7 00001E80 33DF 0000FFD4 2666 MOVE.W (A7)+,SAV_SR ;pop SR 00001E86 23DF 0000FFD0 2667 MOVE.L (A7)+,SAV_PC ;pop PC (It points to 00001E8C 2668 ;next instruction) 00001E8C 4E6D 2669 MOVE.L USP,A5 ;get user's A7 00001E8E 23CD 0000FFCC 2670 MOVE.L A5,SAV_A7 ;save it 00001E94 267C 00002564 2671 MOVEA.L #MSG_2,A3 ;point to message 00001E9A 6100 E9F6 2672 BSR PRTMSG 00001E9E 2439 0000FFD0 2673 MOVE.L SAV_PC,D2 ;get user PC value 00001EA4 6100 EB70 2674 BSR PRT_SIX 00001EA8 6100 E9F8 2675 BSR CRLF 00001EAC 6100 E7CA 2676 BSR CLR_BK ;clear the bkpts 00001EB0 6000 E55A 2677 BRA GET_CMD ;all done 00001EB4 2678 ; 00001EB4 6100 ECD0 2679 ILEGAL BSR REG_SAV 00001EB8 267C 0000257A 2680 MOVEA.L #MSG_3,A3 ;point to message 00001EBE 6100 E9D2 2681 BSR PRTMSG 00001EC2 2439 0000FFD0 2682 MOVE.L SAV_PC,D2 ;get user PC value (illegal instruction) 00001EC8 6100 EB4C 2683 BSR PRT_SIX 00001ECC 5482 2684 ADDQ.L #2,D2 ;skip a longword in SAV_PC 00001ECE 23C2 0000FFD0 2685 MOVE.L D2,SAV_PC 00001ED4 51F9 0000FFFA 2686 SF FP_FLG ;clear flag 00001EDA 6100 E9C6 2687 BSR CRLF 00001EDE 6100 E798 2688 BSR CLR_BK ;clear the bkpts 00001EE2 6000 E528 2689 BRA GET_CMD ;all done 00001EE6 2690 ; 00001EE6 6100 EC9E 2691 DIVZERO BSR REG_SAV 00001EEA 267C 00002598 2692 MOVEA.L #MSG_4,A3 ;point to message 00001EF0 6100 E9A0 2693 BSR PRTMSG 00001EF4 2439 0000FFD0 2694 MOVE.L SAV_PC,D2 ;get user PC value (next instruction) 00001EFA 6100 EB1A 2695 BSR PRT_SIX 00001EFE 6100 E9A2 2696 BSR CRLF 00001F02 6100 E774 2697 BSR CLR_BK ;clear the bkpts 00001F06 6000 E504 2698 BRA GET_CMD ;all done 00001F0A 2699 ; 00001F0A 6100 EC7A 2700 LINE_A BSR REG_SAV 00001F0E 267C 00002615 2701 MOVEA.L #MSG_A,A3 ;point to message 00001F14 6100 E97C 2702 BSR PRTMSG 00001F18 2439 0000FFD0 2703 MOVE.L SAV_PC,D2 ;get user PC value (illegal instruction) 00001F1E 6100 EAF6 2704 BSR PRT_SIX 00001F22 5482 2705 ADDQ.L #2,D2 ;skip a longword in SAV_PC 00001F24 23C2 0000FFD0 2706 MOVE.L D2,SAV_PC 00001F2A 51F9 0000FFFA 2707 SF FP_FLG ;clear flag 00001F30 6100 E970 2708 BSR CRLF 00001F34 6100 E742 2709 BSR CLR_BK ;clear the bkpts 00001F38 6000 E4D2 2710 BRA GET_CMD ;all done 00001F3C 2711 ; 00001F3C 6100 EC48 2712 LINE_F BSR REG_SAV 00001F40 267C 00002644 2713 MOVEA.L #MSG_F,A3 ;point to message 00001F46 6100 E94A 2714 BSR PRTMSG 00001F4A 2439 0000FFD0 2715 MOVE.L SAV_PC,D2 ;get user PC value (illegal instruction) 00001F50 6100 EAC4 2716 BSR PRT_SIX 00001F54 5482 2717 ADDQ.L #2,D2 ;skip a longword in SAV_PC 00001F56 23C2 0000FFD0 2718 MOVE.L D2,SAV_PC 00001F5C 6100 E944 2719 BSR CRLF 00001F60 51F9 0000FFFA 2720 SF FP_FLG ;clear flag 00001F66 6100 E710 2721 BSR CLR_BK ;clear the bkpts 00001F6A 6000 E4A0 2722 BRA GET_CMD ;all done 00001F6E 2723 ; 00001F6E 6100 E708 2724 TRAP_V BSR CLR_BK ;clear the bkpts 00001F72 267C 000025B5 2725 MOVEA.L #MSG_5,A3 00001F78 6016 2726 BRA.S REPORT 00001F7A 2727 ; 00001F7A 6100 E6FC 2728 PRIVIOL BSR CLR_BK ;clear the bkpts 00001F7E 267C 000025C4 2729 MOVEA.L #MSG_6,A3 00001F84 600A 2730 BRA.S REPORT 00001F86 2731 ; 00001F86 6100 E6F0 2732 LEVEL_7 BSR CLR_BK ;clear the bkpts 00001F8A 267C 000025D8 2733 MOVEA.L #MSG_7,A3 00001F90 6100 E910 2734 REPORT BSR CRLF 00001F94 6100 E8FC 2735 BSR PRTMSG ;now the help menu 00001F98 6100 E908 2736 BSR CRLF 00001F9C 6000 E46E 2737 BRA GET_CMD 00001FA0 2738 ; 00001FA0 6100 E8C4 2739 TO_CHARIN BSR CHARIN 00001FA4 4E73 2740 RTE 00001FA6 2741 ; 00001FA6 6100 E8CE 2742 TO_CHAROUT BSR CHAROUT 00001FAA 4E73 2743 RTE 00001FAC 2744 ; 00001FAC 6100 E8F4 2745 TO_CRLF BSR CRLF 00001FB0 4E73 2746 RTE 00001FB2 2747 ; 00001FB2 6100 E8DE 2748 TO_PRTMSG BSR PRTMSG 00001FB6 4E73 2749 RTE 00001FB8 2750 ; 00001FB8 6100 EA32 2751 TO_PRT_BYT BSR PRT_BYT 00001FBC 4E73 2752 RTE 00001FBE 2753 ; 00001FBE 6100 EA42 2754 TO_PRT_WRD BSR PRT_WRD 00001FC2 4E73 2755 RTE 00001FC4 2756 ; 00001FC4 6100 EA46 2757 TO_PRT_LON BSR PRT_LON 00001FC8 4E73 2758 RTE 00001FCA 2759 ; 00001FCA 6100 EAA2 2760 TO_GET_BYT BSR GET_BYT 00001FCE 4E73 2761 RTE 00001FD0 2762 ; 00001FD0 6100 EAD6 2763 TO_GETADR BSR GETADRT 00001FD4 4E73 2764 RTE 00001FD6 2765 ; 00001FD6 2766 ;****************************************************** 00001FD6 2767 ; Begin Unassemble of Instructions. Each entry is in 00001FD6 2768 ; the following format: The 1st word is the opcode 00001FD6 2769 ; with all variable bits made 0. The 2nd word is 00001FD6 2770 ; the mask consisting of all 1's in the bit positions 00001FD6 2771 ; in which the instruction is fully defined and 0's 00001FD6 2772 ; in the positions in which the bits can change. Next 00001FD6 2773 ; are 6 ASCII bytes of null-padded instruction text. 00001FD6 2774 ; Next is one long word pointing to the subroutine 00001FD6 2775 ; that handles the disassembly of the opcode. 00001FD6 2776 ; The order of the commands is extremely important. 00001FD6 2777 ; The most specific commands, those that have more 00001FD6 2778 ; ones bits in their mask, must come first. With each 00001FD6 2779 ; instruction you'll find the bit count of its mask. 00001FD6 2780 ; 00001FD6 2781 ; HEX opcode examples 00001FD6 2782 ;----------------------------------------------------- 00001FD6 2783 ; NOP This instruction is fully defined 00001FD6 2784 ; BITS (X's for variable bits) 0100111001110001 00001FD6 2785 ; 1st word (X bits converted to 0) 0100111001110001 00001FD6 2786 ; 2nd word (The mask, see CMPA below) 1111111111111111 00001FD6 2787 ; Mask bit count of ones = 16 00001FD6 2788 ; 00001FD6 2789 ; CMPA 00001FD6 2790 ; BITS (X's for variable bits) 1011XXXX11XXXXXX 00001FD6 2791 ; 1st word (X bits converted to 0) 1011000011000000 00001FD6 2792 ; 2nd word (Defined bits = 1, X = 0) 1111000011000000 00001FD6 2793 ; Mask bit count of ones = 6 00001FD6 2794 ; 00001FD6 2795 ;****************************************************** 00001FD6 2796 UNINSTR 00001FD6 2797 ; Instructions with 1st nibble = 0000. 00001FD6 2798 ; ORI to CCR. Number of bits in mask = (16) 00001FD6= 003C FFFF 2799 DC.W $3C,$FFFF 00001FDA= 4F 52 49 00 00 00 2800 DC.B 'ORI',0,0,0 00001FE0= 000013B6 2801 DC.L U09 00001FE4 2802 ; ORI to SR (16) 00001FE4= 007C FFFF 2803 DC.W $7C,$FFFF 00001FE8= 4F 52 49 00 00 00 2804 DC.B 'ORI',0,0,0 00001FEE= 000013EA 2805 DC.L U10 00001FF2 2806 ; ANDI to CCR (16) 00001FF2= 023C FFFF 2807 DC.W $23C,$FFFF 00001FF6= 41 4E 44 49 00 00 2808 DC.B 'ANDI',0,0 00001FFC= 000013B6 2809 DC.L U09 00002000 2810 ; ANDI to SR (16) 00002000= 027C FFFF 2811 DC.W $27C,$FFFF 00002004= 41 4E 44 49 00 00 2812 DC.B 'ANDI',0,0 0000200A= 000013EA 2813 DC.L U10 0000200E 2814 ; EORI to CCR (16) 0000200E= 0A3C FFFF 2815 DC.W $A3C,$FFFF 00002012= 45 4F 52 49 00 00 2816 DC.B 'EORI',0,0 00002018= 000013B6 2817 DC.L U09 0000201C 2818 ; EORI to SR (16) 0000201C= 0A7C FFFF 2819 DC.W $A7C,$FFFF 00002020= 45 4F 52 49 00 00 2820 DC.B 'EORI',0,0 00002026= 000013EA 2821 DC.L U10 0000202A 2822 ; BTST (10) 0000202A= 0800 FFC0 2823 DC.W $800,$FFC0 0000202E= 42 54 53 54 00 00 2824 DC.B 'BTST',0,0 00002034= 000014FC 2825 DC.L U14 00002038 2826 ; BCHG (10) 00002038= 0840 FFC0 2827 DC.W $840,$FFC0 0000203C= 42 43 48 47 00 00 2828 DC.B 'BCHG',0,0 00002042= 000014FC 2829 DC.L U14 00002046 2830 ; BCLR (10) 00002046= 0880 FFC0 2831 DC.W $880,$FFC0 0000204A= 42 43 4C 52 00 00 2832 DC.B 'BCLR',0,0 00002050= 000014FC 2833 DC.L U14 00002054 2834 ; BSET (10) 00002054= 08C0 FFC0 2835 DC.W $8C0,$FFC0 00002058= 42 53 45 54 00 00 2836 DC.B 'BSET',0,0 0000205E= 000014FC 2837 DC.L U14 00002062 2838 ; Ordinary ORI (8) 00002062= 0000 FF00 2839 DC.W $0,$FF00 00002066= 4F 52 49 00 00 00 2840 DC.B 'ORI',0,0,0 0000206C= 00001428 2841 DC.L U11 00002070 2842 ; Ordinary ANDI (8) 00002070= 0200 FF00 2843 DC.W $200,$FF00 00002074= 41 4E 44 49 00 00 2844 DC.B 'ANDI',0,0 0000207A= 00001428 2845 DC.L U11 0000207E 2846 ; SUBI (8) 0000207E= 0400 FF00 2847 DC.W $400,$FF00 00002082= 53 55 42 49 00 00 2848 DC.B 'SUBI',0,0 00002088= 00001428 2849 DC.L U11 0000208C 2850 ; ADDI (8) 0000208C= 0600 FF00 2851 DC.W $600,$FF00 00002090= 41 44 44 49 00 00 2852 DC.B 'ADDI',0,0 00002096= 00001428 2853 DC.L U11 0000209A 2854 ; Ordinary EORI (8) 0000209A= 0A00 FF00 2855 DC.W $A00,$FF00 0000209E= 45 4F 52 49 00 00 2856 DC.B 'EORI',0,0 000020A4= 00001428 2857 DC.L U11 000020A8 2858 ; CMPI (8) 000020A8= 0C00 FF00 2859 DC.W $C00,$FF00 000020AC= 43 4D 50 49 00 00 2860 DC.B 'CMPI',0,0 000020B2= 00001428 2861 DC.L U11 000020B6 2862 ; MOVEP (8) 000020B6= 0108 F138 2863 DC.W $108,$F138 000020BA= 4D 4F 56 45 50 00 2864 DC.B 'MOVEP',0 000020C0= 00001962 2865 DC.L U41 000020C4 2866 ; BTST (7) 000020C4= 0100 F1C0 2867 DC.W $100,$F1C0 000020C8= 42 54 53 54 00 00 2868 DC.B 'BTST',0,0 000020CE= 00001522 2869 DC.L U15 000020D2 2870 ; BCHG (7) 000020D2= 0140 F1C0 2871 DC.W $140,$F1C0 000020D6= 42 43 48 47 00 00 2872 DC.B 'BCHG',0,0 000020DC= 00001522 2873 DC.L U15 000020E0 2874 ; BCLR (7) 000020E0= 0180 F1C0 2875 DC.W $180,$F1C0 000020E4= 42 43 4C 52 00 00 2876 DC.B 'BCLR',0,0 000020EA= 00001522 2877 DC.L U15 000020EE 2878 ; BSET (7) 000020EE= 01C0 F1C0 2879 DC.W $1C0,$F1C0 000020F2= 42 53 45 54 00 00 2880 DC.B 'BSET',0,0 000020F8= 00001522 2881 DC.L U15 000020FC 2882 ; MOVEA (5) 000020FC= 0040 C1C0 2883 DC.W $40,$C1C0 00002100= 4D 4F 56 45 41 00 2884 DC.B 'MOVEA',0 00002106= 00001576 2885 DC.L U17 0000210A 2886 ; MOVE (2) 0000210A= 0000 C000 2887 DC.W $0,$C000 0000210E= 4D 4F 56 45 00 00 2888 DC.B 'MOVE',0,0 00002114= 00001544 2889 DC.L U16 00002118 2890 ; Instructions with 1st nibble = 0100 00002118 2891 ; ILLEGAL (16) 00002118= 4AFC FFFF 2892 DC.W $4AFC,$FFFF 0000211C= 49 4C 4C 45 47 00 2893 DC.B 'ILLEG',0 00002122= 000011BE 2894 DC.L U01 00002126 2895 ; RESET (16) 00002126= 4E70 FFFF 2896 DC.W $4E70,$FFFF 0000212A= 52 45 53 45 54 00 2897 DC.B 'RESET',0 00002130= 000011BC 2898 DC.L U00 00002134 2899 ; NOP (16) 00002134= 4E71 FFFF 2900 DC.W $4E71,$FFFF 00002138= 4E 4F 50 00 00 00 2901 DC.B 'NOP',0,0,0 0000213E= 000011BC 2902 DC.L U00 00002142 2903 ; STOP (16) 00002142= 4E72 FFFF 2904 DC.W $4E72,$FFFF 00002146= 53 54 4F 50 00 00 2905 DC.B 'STOP',0,0 0000214C= 00001838 2906 DC.L U34 00002150 2907 ; RTE (16) 00002150= 4E73 FFFF 2908 DC.W $4E73,$FFFF 00002154= 52 54 45 00 00 00 2909 DC.B 'RTE',0,0,0 0000215A= 000011BC 2910 DC.L U00 0000215E 2911 ; RTS (16) 0000215E= 4E75 FFFF 2912 DC.W $4E75,$FFFF 00002162= 52 54 53 00 00 00 2913 DC.B 'RTS',0,0,0 00002168= 000011BC 2914 DC.L U00 0000216C 2915 ; TRAPV (16) 0000216C= 4E76 FFFF 2916 DC.W $4E76,$FFFF 00002170= 54 52 41 50 56 00 2917 DC.B 'TRAPV',0 00002176= 000011BC 2918 DC.L U00 0000217A 2919 ; RTR (16) 0000217A= 4E77 FFFF 2920 DC.W $4E77,$FFFF 0000217E= 52 54 52 00 00 00 2921 DC.B 'RTR',0,0,0 00002184= 000011BC 2922 DC.L U00 00002188 2923 ; SWAP (13) 00002188= 4840 FFF8 2924 DC.W $4840,$FFF8 0000218C= 53 57 41 50 00 00 2925 DC.B 'SWAP',0,0 00002192= 00001626 2926 DC.L U23 00002196 2927 ; LINK (13) 00002196= 4E50 FFF8 2928 DC.W $4E50,$FFF8 0000219A= 4C 49 4E 4B 00 00 2929 DC.B 'LINK',0,0 000021A0= 00001652 2930 DC.L U25 000021A4 2931 ; UNLK (13) 000021A4= 4E58 FFF8 2932 DC.W $4E58,$FFF8 000021A8= 55 4E 4C 4B 00 00 2933 DC.B 'UNLK',0,0 000021AE= 0000163C 2934 DC.L U24 000021B2 2935 ; MOVE An <-> USP (12) 000021B2= 4E60 FFF0 2936 DC.W $4E60,$FFF0 000021B6= 4D 4F 56 45 00 00 2937 DC.B 'MOVE',0,0 000021BC= 000018E4 2938 DC.L U39 000021C0 2939 ; TRAP (12) 000021C0= 4E40 FFF0 2940 DC.W $4E40,$FFF0 000021C4= 54 52 41 50 00 00 2941 DC.B 'TRAP',0,0 000021CA= 0000185C 2942 DC.L U35 000021CE 2943 ; JSR (12) 000021CE= 4E80 FFC0 2944 DC.W $4E80,$FFC0 000021D2= 4A 53 52 00 00 00 2945 DC.B 'JSR',0,0,0 000021D8= 000014F0 2946 DC.L U13 000021DC 2947 ; JMP (12) 000021DC= 4EC0 FFC0 2948 DC.W $4EC0,$FFC0 000021E0= 4A 4D 50 00 00 00 2949 DC.B 'JMP',0,0,0 000021E6= 000014F0 2950 DC.L U13 000021EA 2951 ; EXT (11) 000021EA= 4880 FEB8 2952 DC.W $4880,$FEB8 000021EE= 45 58 54 00 00 00 2953 DC.B 'EXT',0,0,0 000021F4= 000017B4 2954 DC.L U30 000021F8 2955 ; MOVE from SR (10) 000021F8= 40C0 FFC0 2956 DC.W $40C0,$FFC0 000021FC= 4D 4F 56 45 00 00 2957 DC.B 'MOVE',0,0 00002202= 0000189C 2958 DC.L U37 00002206 2959 ; MOVE to CCR (10) 00002206= 44C0 FFC0 2960 DC.W $44C0,$FFC0 0000220A= 4D 4F 56 45 00 00 2961 DC.B 'MOVE',0,0 00002210= 00001874 2962 DC.L U36 00002214 2963 ; MOVE to SR (10) 00002214= 46C0 FFC0 2964 DC.W $46C0,$FFC0 00002218= 4D 4F 56 45 00 00 2965 DC.B 'MOVE',0,0 0000221E= 000018C0 2966 DC.L U38 00002222 2967 ; NBCD (10) 00002222= 4800 FFC0 2968 DC.W $4800,$FFC0 00002226= 4E 42 43 44 00 00 2969 DC.B 'NBCD',0,0 0000222C= 00001818 2970 DC.L U32 00002230 2971 ; PEA (10) 00002230= 4840 FFC0 2972 DC.W $4840,$FFC0 00002234= 50 45 41 00 00 00 2973 DC.B 'PEA',0,0,0 0000223A= 00001828 2974 DC.L U33 0000223E 2975 ; TAS (10) 0000223E= 4AC0 FFC0 2976 DC.W $4AC0,$FFC0 00002242= 54 41 53 00 00 00 2977 DC.B 'TAS',0,0,0 00002248= 00001614 2978 DC.L U22 0000224C 2979 ; NEGX (8) 0000224C= 4000 FF00 2980 DC.W $4000,$FF00 00002250= 4E 45 47 58 00 00 2981 DC.B 'NEGX',0,0 00002256= 000015FE 2982 DC.L U21 0000225A 2983 ; CLR (8) 0000225A= 4200 FF00 2984 DC.W $4200,$FF00 0000225E= 43 4C 52 00 00 00 2985 DC.B 'CLR',0,0,0 00002264= 000015FE 2986 DC.L U21 00002268 2987 ; NEG (8) 00002268= 4400 FF00 2988 DC.W $4400,$FF00 0000226C= 4E 45 47 00 00 00 2989 DC.B 'NEG',0,0,0 00002272= 000015FE 2990 DC.L U21 00002276 2991 ; NOT (8) 00002276= 4600 FF00 2992 DC.W $4600,$FF00 0000227A= 4E 4F 54 00 00 00 2993 DC.B 'NOT',0,0,0 00002280= 000015FE 2994 DC.L U21 00002284 2995 ; TST (8) 00002284= 4A00 FF00 2996 DC.W $4A00,$FF00 00002288= 54 53 54 00 00 00 2997 DC.B 'TST',0,0,0 0000228E= 000015FE 2998 DC.L U21 00002292 2999 ; MOVEM (8) 00002292= 4880 FB80 3000 DC.W $4880,$FB80 00002296= 4D 4F 56 45 4D 00 3001 DC.B 'MOVEM',0 0000229C= 000019DE 3002 DC.L U42 000022A0 3003 ; LEA (7) 000022A0= 41C0 F1C0 3004 DC.W $41C0,$F1C0 000022A4= 4C 45 41 00 00 00 3005 DC.B 'LEA',0,0,0 000022AA= 000017DE 3006 DC.L U31 000022AE 3007 ; CHK (5) 000022AE= 4000 F040 3008 DC.W $4000,$F040 000022B2= 43 48 4B 00 00 00 3009 DC.B 'CHK',0,0,0 000022B8= 00001720 3010 DC.L U28 000022BC 3011 ; Instructions with 1st nibble = 0101 000022BC 3012 ; DBcc (9) 000022BC= 50C8 F0F8 3013 DC.W $50C8,$F0F8 000022C0= 44 42 00 00 00 00 3014 DC.B 'DB',0,0,0,0 000022C6= 000015A8 3015 DC.L U19 000022CA 3016 ; Scc (6) 000022CA= 50C0 F0C0 3017 DC.W $50C0,$F0C0 000022CE= 53 00 00 00 00 00 3018 DC.B 'S',0,0,0,0,0 000022D4= 000015E4 3019 DC.L U20 000022D8 3020 ; ADDQ (5) 000022D8= 5000 F100 3021 DC.W $5000,$F100 000022DC= 41 44 44 51 00 00 3022 DC.B 'ADDQ',0,0 000022E2= 000016EE 3023 DC.L U27 000022E6 3024 ; SUBQ (5) 000022E6= 5100 F100 3025 DC.W $5100,$F100 000022EA= 53 55 42 51 00 00 3026 DC.B 'SUBQ',0,0 000022F0= 000016EE 3027 DC.L U27 000022F4 3028 ; Instructions with 1st nibble = 0110 000022F4 3029 ; BRA (8) 000022F4= 6000 FF00 3030 DC.W $6000,$FF00 000022F8= 42 52 41 00 00 00 3031 DC.B 'BRA',0,0,0 000022FE= 0000149E 3032 DC.L U12 00002302 3033 ; BSR (8) 00002302= 6100 FF00 3034 DC.W $6100,$FF00 00002306= 42 53 52 00 00 00 3035 DC.B 'BSR',0,0,0 0000230C= 0000149E 3036 DC.L U12 00002310 3037 ; Bcc (4) 00002310= 6000 F000 3038 DC.W $6000,$F000 00002314= 42 00 00 00 00 00 3039 DC.B 'B',0,0,0,0,0 0000231A= 0000159C 3040 DC.L U18 0000231E 3041 ; Instructions with 1st nibble = 0111 0000231E 3042 ; MOVEQ (5) 0000231E= 7000 F100 3043 DC.W $7000,$F100 00002322= 4D 4F 56 45 51 00 3044 DC.B 'MOVEQ',0 00002328= 00001934 3045 DC.L U40 0000232C 3046 ; Instructions with 1st nibble = 1000 0000232C 3047 ; SBCD (9) 0000232C= 8100 F1F0 3048 DC.W $8100,$F1F0 00002330= 53 42 43 44 00 00 3049 DC.B 'SBCD',0,0 00002336= 00001686 3050 DC.L U26 0000233A 3051 ; DIVU (7) 0000233A= 80C0 F1C0 3052 DC.W $80C0,$F1C0 0000233E= 44 49 56 55 00 00 3053 DC.B 'DIVU',0,0 00002344= 00001306 3054 DC.L U06 00002348 3055 ; DIVS (7) 00002348= 81C0 F1C0 3056 DC.W $81C0,$F1C0 0000234C= 44 49 56 53 00 00 3057 DC.B 'DIVS',0,0 00002352= 00001306 3058 DC.L U06 00002356 3059 ; OR (4) 00002356= 8000 F000 3060 DC.W $8000,$F000 0000235A= 4F 52 00 00 00 00 3061 DC.B 'OR',0,0,0,0 00002360= 000011C8 3062 DC.L U02 00002364 3063 ; Instructions with 1st nibble = 1001 00002364 3064 ; SUBX (7) 00002364= 9100 F130 3065 DC.W $9100,$F130 00002368= 53 55 42 58 00 00 3066 DC.B 'SUBX',0,0 0000236E= 00001254 3067 DC.L U04 00002372 3068 ; SUBA (6) 00002372= 90C0 F0C0 3069 DC.W $90C0,$F0C0 00002376= 53 55 42 41 00 00 3070 DC.B 'SUBA',0,0 0000237C= 0000120C 3071 DC.L U03 00002380 3072 ; SUB (4) 00002380= 9000 F000 3073 DC.W $9000,$F000 00002384= 53 55 42 00 00 00 3074 DC.B 'SUB',0,0,0 0000238A= 000011C8 3075 DC.L U02 0000238E 3076 ; Instructions with 1st nibble = 1011 0000238E 3077 ; CMPM (8) 0000238E= B108 F138 3078 DC.W $B108,$F138 00002392= 43 4D 50 4D 00 00 3079 DC.B 'CMPM',0,0 00002398= 000012C0 3080 DC.L U05 0000239C 3081 ; CMPA (6) 0000239C= B0C0 F0C0 3082 DC.W $B0C0,$F0C0 000023A0= 43 4D 50 41 00 00 3083 DC.B 'CMPA',0,0 000023A6= 0000120C 3084 DC.L U03 000023AA 3085 ; EOR (5) 000023AA= B100 F100 3086 DC.W $B100,$F100 000023AE= 45 4F 52 00 00 00 3087 DC.B 'EOR',0,0,0 000023B4= 000011C8 3088 DC.L U02 000023B8 3089 ; CMP (4) 000023B8= B000 F000 3090 DC.W $B000,$F000 000023BC= 43 4D 50 00 00 00 3091 DC.B 'CMP',0,0,0 000023C2= 000011C8 3092 DC.L U02 000023C6 3093 ; Instructions with 1st nibble = 1100 000023C6 3094 ; EXG Dn,Dm. (10) 000023C6= C140 F1F8 3095 DC.W $C140,$F1F8 000023CA= 45 58 47 00 00 00 3096 DC.B 'EXG',0,0,0 000023D0= 00001742 3097 DC.L U29DD 000023D4 3098 ; EXG An,Am. (10) 000023D4= C148 F1F8 3099 DC.W $C148,$F1F8 000023D8= 45 58 47 00 00 00 3100 DC.B 'EXG',0,0,0 000023DE= 00001768 3101 DC.L U29AA 000023E2 3102 ; EXG Dn,An. (10) 000023E2= C188 F1F8 3103 DC.W $C188,$F1F8 000023E6= 45 58 47 00 00 00 3104 DC.B 'EXG',0,0,0 000023EC= 0000178E 3105 DC.L U29DA 000023F0 3106 ; ABCD (9) 000023F0= C100 F1F0 3107 DC.W $C100,$F1F0 000023F4= 41 42 43 44 00 00 3108 DC.B 'ABCD',0,0 000023FA= 00001686 3109 DC.L U26 000023FE 3110 ; MULS (7) 000023FE= C1C0 F1C0 3111 DC.W $C1C0,$F1C0 00002402= 4D 55 4C 53 00 00 3112 DC.B 'MULS',0,0 00002408= 00001306 3113 DC.L U06 0000240C 3114 ; MULU (7) 0000240C= C0C0 F1C0 3115 DC.W $C0C0,$F1C0 00002410= 4D 55 4C 55 00 00 3116 DC.B 'MULU',0,0 00002416= 00001306 3117 DC.L U06 0000241A 3118 ; AND (4) 0000241A= C000 F000 3119 DC.W $C000,$F000 0000241E= 41 4E 44 00 00 00 3120 DC.B 'AND',0,0,0 00002424= 000011C8 3121 DC.L U02 00002428 3122 ; Instructions with 1st nibble = 1101 00002428 3123 ; ADDX (7) 00002428= D100 F130 3124 DC.W $D100,$F130 0000242C= 41 44 44 58 00 00 3125 DC.B 'ADDX',0,0 00002432= 00001254 3126 DC.L U04 00002436 3127 ; ADDA (6) 00002436= D0C0 F0C0 3128 DC.W $D0C0,$F0C0 0000243A= 41 44 44 41 00 00 3129 DC.B 'ADDA',0,0 00002440= 0000120C 3130 DC.L U03 00002444 3131 ; ADD (4) 00002444= D000 F000 3132 DC.W $D000,$F000 00002448= 41 44 44 00 00 00 3133 DC.B 'ADD',0,0,0 0000244E= 000011C8 3134 DC.L U02 00002452 3135 ; Instructions with 1st nibble = 1110 00002452 3136 ; ASL and ASR mem shifts (9) 00002452= E0C0 FEC0 3137 DC.W $E0C0,$FEC0 00002456= 41 53 00 00 00 00 3138 DC.B 'AS',0,0,0,0 0000245C= 00001328 3139 DC.L U07 00002460 3140 ; LSL and LSR mem shifts (9) 00002460= E2C0 FEC0 3141 DC.W $E2C0,$FEC0 00002464= 4C 53 00 00 00 00 3142 DC.B 'LS',0,0,0,0 0000246A= 00001328 3143 DC.L U07 0000246E 3144 ; ROXL and ROXR mem shifts (9) 0000246E= E4C0 FEC0 3145 DC.W $E4C0,$FEC0 00002472= 52 4F 58 00 00 00 3146 DC.B 'ROX',0,0,0 00002478= 00001328 3147 DC.L U07 0000247C 3148 ; ROL and ROR mem shifts (9) 0000247C= E6C0 FEC0 3149 DC.W $E6C0,$FEC0 00002480= 52 4F 00 00 00 00 3150 DC.B 'RO',0,0,0,0 00002486= 00001328 3151 DC.L U07 0000248A 3152 ; ASL and ASR reg shifts (6) 0000248A= E000 F018 3153 DC.W $E000,$F018 0000248E= 41 53 00 00 00 00 3154 DC.B 'AS',0,0,0,0 00002494= 00001354 3155 DC.L U08 00002498 3156 ; LSL and LSR reg shifts (6) 00002498= E008 F018 3157 DC.W $E008,$F018 0000249C= 4C 53 00 00 00 00 3158 DC.B 'LS',0,0,0,0 000024A2= 00001354 3159 DC.L U08 000024A6 3160 ; ROXL and ROXR reg shifts (6) 000024A6= E010 F018 3161 DC.W $E010,$F018 000024AA= 52 4F 58 00 00 00 3162 DC.B 'ROX',0,0,0 000024B0= 00001354 3163 DC.L U08 000024B4 3164 ; ROL and ROR reg shifts (6) 000024B4= E018 F018 3165 DC.W $E018,$F018 000024B8= 52 4F 00 00 00 00 3166 DC.B 'RO',0,0,0,0 000024BE= 00001354 3167 DC.L U08 000024C2 3168 ; This is the 'I have no idea' entry. 000024C2= 0000 0000 3169 DC.W 0,0 000024C6= 3F 3F 3F 3F 3F 00 3170 DC.B '?????',0 000024CC= 000011BC 3171 DC.L U00 000024D0 3172 ; 000024D0= 54 20 3173 UCCLST DC.B 'T ' 000024D2= 46 20 3174 DC.B 'F ' 000024D4= 48 49 3175 DC.B 'HI' 000024D6= 4C 53 3176 DC.B 'LS' 000024D8= 43 43 3177 DC.B 'CC' 000024DA= 43 53 3178 DC.B 'CS' 000024DC= 4E 45 3179 DC.B 'NE' 000024DE= 45 51 3180 DC.B 'EQ' 000024E0= 56 43 3181 DC.B 'VC' 000024E2= 56 53 3182 DC.B 'VS' 000024E4= 50 4C 3183 DC.B 'PL' 000024E6= 4D 49 3184 DC.B 'MI' 000024E8= 47 45 3185 DC.B 'GE' 000024EA= 4C 54 3186 DC.B 'LT' 000024EC= 47 54 3187 DC.B 'GT' 000024EE= 4C 45 3188 DC.B 'LE' 000024F0 3189 ; 000024F0 3190 ;*************************************************** 000024F0 3191 ;End Unassemble Instructions 000024F0 3192 ;*************************************************** 000024F0 3193 ; 000024F0 3194 ; Vectors to the command line routines 000024F0= 0000048A 3195 CMD_ADR DC.L DUMP ;DUMP execution address 000024F4= 0000054A 3196 DC.L GO 000024F8= 000006EE 3197 DC.L EDIT 000024FC= 000006D0 3198 DC.L MOOV 00002500= 00001E5A 3199 DC.L HELP 00002504= 00000D78 3200 DC.L LD_FILE 00002508= 00000470 3201 DC.L FILL 0000250C= 000010A8 3202 DC.L HEXCALC 00002510= 0000071E 3203 DC.L REGMOD 00002514= 00000F42 3204 DC.L BEG_TRC ;tracing 00002518= 00001028 3205 DC.L BREAK 0000251C= 000010DC 3206 DC.L UNASM 00002520= 0000069E 3207 DC.L VERIFY 00002524 3208 ; The next command is for future command 00002524 3209 ; development in the RAM of the SBC 00002524 3210 ; DC.L FUTURE 00002524 3211 ; 00002524= 44 3212 COMANDS DC.B 'D' 00002525= 47 3213 DC.B 'G' 00002526= 45 3214 DC.B 'E' 00002527= 4D 3215 DC.B 'M' 00002528= 3F 3216 DC.B '?' 00002529= 4C 3217 DC.B 'L' 0000252A= 46 3218 DC.B 'F' 0000252B= 48 3219 DC.B 'H' 0000252C= 52 3220 DC.B 'R' 0000252D= 54 3221 DC.B 'T' 0000252E= 42 3222 DC.B 'B' 0000252F= 55 3223 DC.B 'U' 00002530= 43 3224 DC.B 'C' 00002531 3225 ; The next command is for future command 00002531 3226 ; development in the RAM of the SBC 00002531 3227 ; DC.B 'X' 00002531 3228 ; 00002531 3229 ; Messages go at end so that code word 00002531 3230 ; alignment won't get derailed 00002531= 20 46 6C 61 67 73 ... 3231 mesgflg dc.b ' Flags: X = ',0 0000253E= 2C 20 4E 20 3D 20 00 3232 mesgn dc.b ', N = ',0 00002545= 2C 20 5A 20 3D 20 00 3233 mesgz dc.b ', Z = ',0 0000254C= 2C 20 56 20 3D 20 00 3234 mesgv dc.b ', V = ',0 00002553= 2C 20 43 20 3D 20 00 3235 mesgc dc.b ', C = ',0 0000255A 3236 ; 0000255A= 42 75 73 20 45 72 ... 3237 MSG_1 DC.B 'Bus Error',0 00002564= 41 64 64 72 65 73 ... 3238 MSG_2 DC.B 'Address Error before ',0 0000257A= 49 6C 6C 65 67 61 ... 3239 MSG_3 DC.B 'Illegal Instruction Error at ' 00002597= 00 3240 DC.B 0 00002598= 44 69 76 69 64 65 ... 3241 MSG_4 DC.B 'Divide by Zero Error before ',0 000025B5= 54 52 41 50 56 20 ... 3242 MSG_5 DC.B 'TRAPV Overflow',0 000025C4= 50 72 69 76 69 6C ... 3243 MSG_6 DC.B 'Privilege Violation',0 000025D8= 4C 65 76 65 6C 2D ... 3244 MSG_7 DC.B 'Level-7 Interrupt',0 000025EA= 0D 0A 42 72 65 61 ... 3245 MSG_8 DC.B CR,LF,'Breakpoint 1: ',0 000025FB= 0D 0A 42 72 65 61 ... 3246 MSG_9 DC.B CR,LF,'Breakpoint 2: ',0 0000260C= 49 6E 61 63 74 69 ... 3247 MSG_10 DC.B 'Inactive',0 00002615= 4C 69 6E 65 20 31 ... 3248 MSG_A DC.B 'Line 1010 emulator instruction encountered at ',0 00002644= 4C 69 6E 65 20 31 ... 3249 MSG_F DC.B 'Line 1111 emulator instruction encountered at ',0 00002673 3250 ; 00002673 3251 ; Help menu in response to typing a ? 00002673= 0D 0A 3252 H_MSG1 DC.B CR,LF 00002675= 2A 2A 2A 20 36 38 ... 3253 DC.B '*** 68EC000 CPU-based ' 0000268B= 53 69 6E 67 6C 65 ... 3254 DC.B 'Single Board Computer ' 000026A1= 2A 2A 2A 20 4D 6F ... 3255 DC.B '*** Monitor Version 3.00',CR,LF 000026BB= 3D 3D 3D 3D 3D 3D ... 3256 DC.B '====================================' 000026DF= 3D 3D 3D 3D 3D 3D ... 3257 DC.B '================================' 000026FF= 0D 0A 3258 DC.B CR,LF 00002701= 42 20 3C 31 20 6F ... 3259 DC.B 'B <1 or 2> ' 0000271E= 53 65 74 20 70 65 ... 3260 DC.B 'Set permanent breakpoint ' 00002737= 31 20 6F 72 20 32 ... 3261 DC.B '1 or 2.',CR,LF 00002740= 42 20 3C 31 20 6F ... 3262 DC.B 'B <1 or 2> ' 0000275D= 43 6C 65 61 72 20 ... 3263 DC.B 'Clear breakpoint 1 or 2.',CR,LF 00002777= 42 3C 45 4E 54 3E ... 3264 DC.B 'B ' 00002794= 44 69 73 70 6C 61 ... 3265 DC.B 'Display permanent breakpoints.',CR,LF 000027B4= 43 20 3C 73 74 61 ... 3266 DC.B 'C ' 000027D1= 43 6F 6D 70 61 72 ... 3267 DC.B 'Compare Memory',CR,LF 000027E1= 44 20 3C 73 74 61 ... 3268 DC.B 'D <#$ of lines> ' 000027FE= 44 75 6D 70 20 4D ... 3269 DC.B 'Dump Memory with optional ' 00002818= 70 61 72 61 6D 65 ... 3270 DC.B 'parameters. ^C to quit.',CR,LF 00002831= 44 20 2C 20 3C 23 ... 3271 DC.B 'D , <#$ of lines> As ' 00002851= 61 62 6F 76 65 2C ... 3272 DC.B 'above, but start at current address.' 00002875= 0D 0A 3273 DC.B CR,LF 00002877= 45 20 3C 61 64 64 ... 3274 DC.B 'E
' 00002894= 45 64 69 74 20 4D ... 3275 DC.B 'Edit Memory',CR,LF 000028A1= 46 20 3C 73 74 61 ... 3276 DC.B 'F ' 000028BE= 46 69 6C 6C 20 4D ... 3277 DC.B 'Fill Memory',CR,LF 000028CB= 47 20 3C 73 74 61 ... 3278 DC.B 'G ' 000028E8= 47 6F 20 74 6F 20 ... 3279 DC.B 'Go to USER program with op' 00002902= 74 69 6F 6E 61 6C ... 3280 DC.B 'tional breakpoints.',CR,LF 00002917= 47 20 2C 20 3C 62 ... 3281 DC.B 'G , ' 00002934= 41 73 20 61 62 6F ... 3282 DC.B 'As above but start at ' 0000294A= 63 75 72 72 65 6E ... 3283 DC.B 'current program counter.' 00002962= 0D 0A 3284 DC.B CR,LF 00002964= 47 3C 45 4E 54 3E ... 3285 DC.B 'G ' 00002981= 53 74 61 72 74 20 ... 3286 DC.B 'Start at current program ' 0000299A= 63 6F 75 6E 74 65 ... 3287 DC.B 'counter, no breakpoints.' 000029B2= 0D 0A 3288 DC.B CR,LF 000029B4= 48 20 3C 64 61 74 ... 3289 DC.B 'H ' 000029D1= 48 65 78 20 73 75 ... 3290 DC.B 'Hex sum & difference',CR,LF 000029E7= 4C 20 3C 6F 70 74 ... 3291 DC.B 'L ' 00002A04= 4C 6F 61 64 20 53 ... 3292 DC.B 'Load S-FILE Program. ^C to abandon.' 00002A27= 0D 0A 3293 DC.B CR,LF 00002A29= 4D 20 3C 73 74 61 ... 3294 DC.B 'M ' 00002A46= 4D 6F 76 65 20 4D ... 3295 DC.B 'Move Memory',CR,LF 00002A53= 52 20 20 20 20 20 ... 3296 DC.B 'R ' 00002A70= 52 65 67 69 73 74 ... 3297 DC.B 'Register Dump',CR,LF 00002A7F= 52 20 44 37 20 20 ... 3298 DC.B 'R D7 ' 00002A9C= 52 65 67 69 73 74 ... 3299 DC.B 'Register Modify D7',CR,LF 00002AB0= 54 20 3C 6F 70 74 ... 3300 DC.B 'T ' 00002ACD= 54 72 61 63 65 2E ... 3301 DC.B 'Trace. >R Dn to modify any ' 00002AEE= 72 65 67 69 73 74 ... 3302 DC.B 'register while ',CR,LF 00002AFF= 20 20 20 20 20 20 ... 3303 DC.B ' ' 00002B1C= 74 72 61 63 69 6E ... 3304 DC.B 'tracing. Type to continue ' 00002B3C= 74 72 61 63 69 6E ... 3305 DC.B 'tracing.',CR,LF 00002B46= 55 20 3C 73 74 61 ... 3306 DC.B 'U <#$ of lines> ' 00002B63= 55 6E 61 73 73 65 ... 3307 DC.B 'Unassemble memory with optional ' 00002B83= 70 61 72 61 6D 65 ... 3308 DC.B 'parameters.',CR,LF 00002B90= 55 20 2C 20 3C 23 ... 3309 DC.B 'U , <#$ of lines> As ' 00002BB0= 61 62 6F 76 65 2C ... 3310 DC.B 'above, but start at current address.' 00002BD4= 0D 0A 3311 DC.B CR,LF 00002BD6= 3F 20 20 20 20 20 ... 3312 DC.B '? ' 00002BF3= 54 68 69 73 20 53 ... 3313 DC.B 'This Screen',0 00002BFF 3314 ; 00002BFF= 42 61 64 20 43 6F ... 3315 BADCMD DC.B 'Bad Command.',0 00002C0C= 49 6E 76 61 6C 69 ... 3316 INVDATA DC.B 'Invalid address or hex ' 00002C23= 64 61 74 61 2E 00 3317 DC.B 'data.',0 00002C29= 0D 0A 36 38 45 43 ... 3318 HELLO DC.B CR,LF,'68EC000 Monitor, ' 00002C3C= 76 65 72 73 69 6F ... 3319 DC.B 'version 3.00',CR,LF,LF 00002C4B= 54 79 70 65 20 3F ... 3320 DC.B 'Type ? for help menu.' 00002C60= 0D 0A 00 3321 DC.B CR,LF,0 00002C63 3322 ; Load file error message 00002C63= 54 68 65 72 65 20 ... 3323 LE_MSG DC.B 'There was an error ' 00002C76= 6C 6F 61 64 69 6E ... 3324 DC.B 'loading the file.',0 00002C88= 20 48 45 58 20 66 ... 3325 LG_MSG DC.B ' HEX file loaded successfully.' 00002CA6= 0D 0A 00 3326 DC.B CR,LF,0 00002CA9= 0D 0A 3327 LS_MSG DC.B CR,LF 00002CAB= 53 74 61 72 74 20 ... 3328 DC.B 'Start sending the file, ' 00002CC3= 5E 43 20 74 6F 20 ... 3329 DC.B '^C to abandon.' 00002CD1= 0D 0A 00 3330 DC.B CR,LF,0 00002CD4= 4C 6F 61 64 69 6E ... 3331 LF_MSG DC.B 'Loading file named ',0 00002CE8= 0D 0A 53 75 6D 20 ... 3332 HS_MSG DC.B CR,LF,'Sum = ',0 00002CF2= 0D 0A 44 69 66 66 ... 3333 HD_MSG DC.B CR,LF,'Diff = ',0 00002CFC= 08 20 08 00 3334 BSSPBS dc.b 8,' ',8,0 00002D00= 0D 0A 25 00 3335 REDOMSG DC.B CR,LF,'%',0 00002D04= 0D 0A 3336 MSG_NIN DC.B CR,LF 00002D06= 50 72 6F 67 72 61 ... 3337 DC.B 'Program terminated at ' 00002D1C= 61 64 64 72 65 73 ... 3338 DC.B 'address ',0 00002D25= 0D 0A 3339 MSG_TEN DC.B CR,LF 00002D27= 42 72 65 61 6B 70 ... 3340 DC.B 'Breakpoint encountered at ' 00002D41= 61 64 64 72 65 73 ... 3341 DC.B 'address ',0 00002D4A= 54 52 41 50 20 69 ... 3342 TRC_MSG DC.B 'TRAP instruction is next. ' 00002D64= 54 72 61 63 65 20 ... 3343 DC.B 'Trace terminated.',0 00002D76= 0D 0A 43 6F 6D 70 ... 3344 PASSMSG DC.B CR,LF,'Comparison successful.',CR,LF,0 00002D91= 0D 0A 43 6F 6D 70 ... 3345 FAILMSG DC.B CR,LF,'Comparison failed.',CR,LF,0 00002DA8= 20 20 20 20 20 20 ... 3346 SP24MSG DC.B ' ',0 00002DBF= 50 43 3A 20 20 20 00 3347 PC_MSG DC.B 'PC: ',0 00002DC6= 53 52 3A 20 20 20 ... 3348 SR_MSG DC.B 'SR: ',0 00002DCF= 0D 0A 54 68 69 73 ... 3349 UIMPMSG DC.B CR,LF,'This TRAP #15 task is not ' 00002DEB= 69 6D 70 6C 65 6D ... 3350 DC.B 'implemented!',0 00002DF8 3351 ; 00002DF8= 00 3352 ZEND DC.B 0 00002DF9 3353 ; 00002DF9 3354 END START No errors detected No warnings generated SYMBOL TABLE INFORMATION Symbol-name Value ------------------------- ADDERR 1E76 ADR_OUT 4DE ASC_BCD A4E ASC_BX A5A ASC_OUT 50A BADCMD 2BFF BEG1 F54 BEG_TRC F42 BFEBIT 1 BP_AD3 FFDA BP_AD4 FFDE BP_ADS1 FFE2 BP_ADS2 FFE6 BP_ADS3 FFEA BP_ADS4 FFEE BREAK 1028 BREAK1 1042 BREAK2 104E BREAK3 1054 BS 8 BSSPBS 2CFC BUSERR 1E68 BYTEOUT 4EC CHARIN 866 CHARIO 89C CHAROUT 876 CLR_BK 678 CLR_BK1 686 CLR_BK2 690 CMDERR A3A CMD_ADR 24F0 COL_SP D66 COMANDS 2524 CR D CRLF 8A2 CSREG 10001 DATAERR A44 DAVBIT 2 DIVZERO 1EE6 DOIT 19B2 DO_JUMP 46C DREG 10000 DSPBRK 1058 DSPBRK1 1078 DSPBRK2 107E DSPBRK3 109E DSPBRK4 10A4 DUMP 48A DUMP0 4A4 DUMP0A 4B6 DUMP1 4D2 DUMPADR FFD6 DUMPBYT 8F ECHOFLG FFFD EDIT 6EE ENDRAM 10000 ENTR_IT 71A EX_ADR AE6 FAIL 6C2 FAILMSG 2D91 FILL 470 FILLEM 482 FP_FLG FFFA FUTURE 8010 GETADR ABC GETADRT AA8 GETB1 A78 GETB2 A9C GETB3 AA4 GETBX AA6 GETCH1 B2A GETCH2 B3C GETCHAR B06 GETCHX B46 GETLIN AFA GETLIN2 B02 GET_BYT A6E GET_CMD 40C GO 54A GO1 55C GO2 56E GO3 58A GO4 5B4 GO5 5D2 GO6 5DA GOSKIP 5EC HD_MSG 2CF2 HELLO 2C29 HELP 1E5A HEXCALC 10A8 HS_MSG 2CE8 H_MSG1 2673 ILEGAL 1EB4 INCOM 438 INPBUF FF70 INSTAT 852 INVDATA 2C0C IS_S DB4 LD_AD1 ECC LD_AD2 EF4 LD_ADR EBC LD_CHK F1A LD_DATA EF6 LD_ERR F38 LD_FIL0 D8C LD_FIL1 D96 LD_FILE D78 LD_NUM EA2 LEVEL_7 1F86 LE_MSG 2C63 LF A LF_MSG 2CD4 LG_MSG 2C88 LINE_A 1F0A LINE_F 1F3C LS_MSG 2CA9 MESGC 2553 MESGFLG 2531 MESGN 253E MESGV 254C MESGZ 2545 MOOV 6D0 MOOV1 6E4 MSG_1 255A MSG_10 260C MSG_2 2564 MSG_3 257A MSG_4 2598 MSG_5 25B5 MSG_6 25C4 MSG_7 25D8 MSG_8 25EA MSG_9 25FB MSG_A 2615 MSG_F 2644 MSG_NIN 2D04 MSG_TEN 2D25 NEW_DAT 6F8 NEXTCHR AC4 NO_CHG AF8 NULLR1 B68 NULLREG B5C NUMCMD D NUM_ASC A5C NUM_EX A6C OLD_PC FF36 OPCOD1 FFF2 OPCOD2 FFF4 OPCOD3 FFF6 OPCOD4 FFF8 PASSMSG 2D76 PC_MSG 2DBF PRIVIOL 1F7A PRTBUF FF60 PRTMEX 89A PRTMSG 892 PRTNEW C46 PRTOLD BF6 PRTOLD1 C0C PRTOLD2 C1C PRTOLD3 C32 PRTSR CBA PRTSTR 924 PRTSTR1 926 PRT_BYT 9EC PRT_LON A0C PRT_SIX A16 PRT_WRD A02 QUIT 6C8 RAM 8000 RAMLEN 8000 REDOMSG 2D00 REGD1 C82 REGDFIN CB4 REGDISP C7E REGETC1 CEC REGETC2 D08 REGETC3 D24 REGETC4 D40 REGETC5 D5C REGME 82C REGMOD 71E REGMOD0 736 REGMOD1 7C4 REGMQ 81E REGPRT1 BD8 REGREST BB2 REGTYP FF48 REG_PRT BD4 REG_SAV B86 REPORT 1F90 RID1 60C RID2 612 RID3 61A RID_EQ 602 S0 DFC S0A E12 S0B E2A S12 E34 S2_FLG FFFC S5 E46 S5A E4E S89 E5A S89A E7A SAVREGS FF90 SAV_A7 FFCC SAV_PC FFD0 SAV_SR FFD4 SEARCH 44E SEND1 542 SEND_IT 51C SERINI 83A SIGN_ON 9E0 SKIPFLG FFFB SKIPSP B50 SKIPSPE B5A SP24MSG 2DA8 SPACE 8B0 SPARE FF47 SR_MSG 2DC6 STACK FF36 START 400 TASK0 91A TASK1 920 TASK12 9BA TASK13 9CC TASK14 9D8 TASK2 932 TASK2A 934 TASK2BS 94E TASK2EX 95E TASK4 966 TASK4A 968 TASK4EX 990 TASK5 994 TASK5EX 9A4 TASK6 9A6 TASK7 9AC TASK7EX 9B8 TO_CHARIN 1FA0 TO_CHAROUT 1FA6 TO_CRLF 1FAC TO_GETADR 1FD0 TO_GET_BYT 1FCA TO_PRTMSG 1FB2 TO_PRT_BYT 1FB8 TO_PRT_LON 1FC4 TO_PRT_WRD 1FBE TRACE F5E TRACE0 F72 TRACE1 F9C TRACE2 FBC TRACE3 FD6 TRACE4 FDA TRACE5 FF0 TRACE6 100E TRAP_V 1F6E TRC_MSG 2D4A TRPELF 4E4B TRPTEN 4E4A TRP_10 64E TRP_11 8000 TRP_12 8004 TRP_13 8008 TRP_14 800C TRP_15 8BE TRP_9 628 TSK12EX 9CA TSTNEXT 45E TWO_SP 8B8 U00 11BC U01 11BE U02 11C8 U02_01 11F6 U02_02 120A U03 120C U03_01 1228 U03_02 1238 U04 1254 U04_01 12A2 U04_02 12BE U05 12C0 U06 1306 U07 1328 U07_01 1338 U07_02 133C U08 1354 U08_01 1364 U08_02 1368 U08_03 138C U08_06 13A0 U08_08 13A6 U09 13B6 U10 13EA U11 1428 U11_01 1452 U11_02 146E U11_03 1494 U12 149E U12_00 14AE U12_01 14CE U12_02 14D8 U12_03 14E0 U12_04 14E4 U13 14F0 U14 14FC U15 1522 U16 1544 U17 1576 U18 159C U19 15A8 U19_01 15D8 U20 15E4 U21 15FE U22 1614 U23 1626 U24 163C U25 1652 U25_01 167A U26 1686 U26_01 16B8 U26_02 16EC U27 16EE U28 1720 U29AA 1768 U29DA 178E U29DD 1742 U30 17B4 U30_01 17C6 U30_02 17CA U31 17DE U31A 17F4 U31B 17FC U32 1818 U33 1828 U34 1838 U35 185C U36 1874 U37 189C U38 18C0 U39 18E4 U39_01 1916 U39_02 1932 U40 1934 U41 1962 U41_01 1972 U41_02 197A U41_03 199C U41_04 19B0 U42 19DE U42_01 19EE U42_02 19F6 U42_03 1A00 U42_04 1A2C U42_05 1A20 U42_06 1A1A U42_07 1A68 U42_08 1A9A U42_09 1A8A U42_10 1A5E UASMCMD FF3E UASMOPR FF46 UCC 1DAA UCCLST 24D0 UEA 1A9C UEA0 1CB8 UEA1 1C6E UEA10 1BF0 UEA11 1ADA UEA12 1AF8 UEA13 1C3E UEA14 1C42 UEA15 1C62 UEA16 1C66 UEA17 1B60 UEA18 1B64 UEA19 1B84 UEA1A 1C74 UEA2 1C0C UEA20 1B88 UEA3 1CA0 UEA4 1CF0 UEA5 1CDC UEA6 1D02 UEA7 1B22 UEA8 1BBC UEA9 1B90 UEAD 1D10 UGBYT 1D2C UIMPMSG 2DCF UM 1DC8 UM00 1DCE UM01 1DE0 UM02 1E04 UM03 1E26 UM04 1E38 UME 1E3E UME0 1E4A UMP 1E4C UNADR FF3A UNASM 10DC UNASM1 1194 UNASM2 119C UNASMB 1170 UNASML 117E UNASMS1 10F2 UNASMS2 1114 UNASMS3 111A UNASMS4 112A UNASMS5 113A UNASMS6 1150 UNINSTR 1FD6 UNSEAR 11A2 UNSEAR0 11A8 UNSEARE 11BA UN_PRT 518 UP_CASE AE8 UREG 1D12 UREG1 1D20 USM1 1104 USTCK FEB0 USZ 1D42 USZ1 1D54 USZ2 1D68 USZE 1D74 USZM 1D76 USZM1 1D88 USZM2 1D9C USZME 1DA8 VALDIG A20 VALDIGE A38 VERIF1 6B2 VERIFY 69E ZEND 2DF8