SOURCE VIEWER

ch14p3.lst

Original bytes preserved. This is a browser-readable view.

DOWNLOAD ORIGINAL ↓

HD61700 ASSEMBLER Rev 0.45 - ASSEMBLY LIST OF [ch14p3.s]
00001:0000            ; MD-120 diagnostic command 0x32 on the FX-870P
00002:0000            
00003:0000                         org     0
00004:0000                         start   0
00005:0000            
00006:0000  420005                 ld      $0,&H05               ;FDD command &H05: enter the diagnostic mode
00007:0003  774C00                 cal     cm1                   ;send the command $0 to the FDD
00008:0006  420032                 ld      $0,&H32               ;diagnostic command &H32: beep
00009:0009  774C00                 cal     cm1                   ;send the command $0 to the FDD
00010:000C  771900                 cal     rd1                   ;read a byte from the FDD to $0
00011:000F  420021                 ld      $0,&H21               ;diagnostic command &H21: system restart
00012:0012  774C00                 cal     cm1                   ;send the command $0 to the FDD
00013:0015  566054                 pst     ua,&H54
00014:0018  F7                     rtn     
00015:0019            
00016:0019            ; read a byte from the FDD to $0
00017:0019  1E61      rd1:         gst     ua,$1
00018:001B  026201                 ld      $2,$1
00019:001E  4E0230                 or      $2,&H30
00020:0021  1662                   pst     ua,$2
00021:0023  D600FFFF               pre     ix,&HFFFF
00022:0027  2800      rd2:         ld      $0,(ix+$sx)           ;FDD status
00023:0029  0420                   anc     $0,$sy
00024:002B  B485                   jr      nz,rd2                ;wait until the FDD sends the data byte
00025:002D  28A0                   ld      $0,(ix-$sy)           ;FDD data
00026:002F  1661                   pst     ua,$1
00027:0031  F7                     rtn     
00028:0032            
00029:0032            ; write a byte $0 to the FDD
00030:0032  1E61      wr1:         gst     ua,$1
00031:0034  026201                 ld      $2,$1
00032:0037  4E0230                 or      $2,&H30
00033:003A  1662                   pst     ua,$2
00034:003C  D600FFFF               pre     ix,&HFFFF
00035:0040  20A0                   st      $0,(ix-$sy)           ;FDD data
00036:0042  2800      wr2:         ld      $0,(ix+$sx)           ;FDD status
00037:0044  440002                 anc     $0,&H02
00038:0047  B086                   jr      z,wr2                 ;wait until the FDD reads the data byte
00039:0049  1661                   pst     ua,$1
00040:004B  F7                     rtn     
00041:004C            
00042:004C            ; write a command $0 to the FDD
00043:004C  1E61      cm1:         gst     ua,$1
00044:004E  026201                 ld      $2,$1
00045:0051  4E0230                 or      $2,&H30
00046:0054  1662                   pst     ua,$2
00047:0056  D600FFFF               pre     ix,&HFFFF
00048:005A  2000                   st      $0,(ix+$sx)           ;FDD command
00049:005C  2800      cm2:         ld      $0,(ix+$sx)           ;FDD status
00050:005E  440004                 anc     $0,&H04
00051:0061  B086                   jr      z,cm2                 ;wait until the FDD reads the command byte
00052:0063  1661                   pst     ua,$1
00053:0065  F7                     rtn     
00054:0066            
00055:0066            

ASSEMBLY COMPLETE, NO ERRORS FOUND

HD61700 ASSEMBLER Rev 0.45 - MAP LIST OF [ch14p3.s]
 LABEL           : ADDRESS(hex)  | LABEL           : ADDRESS(hex)
-------------------------------------------------------------------
 rd1             :   0019h     A | rd2             :   0027h      A
 wr1             :   0032h     A | wr2             :   0042h      A
 cm1             :   004Ch     A | cm2             :   005Ch      A

 START ADDRESS   = 0000h
 END ADDRESS     = 0065h
 EXECUTE ADDRESS = 0000h