; ; SC84 Machine Code Operating System ; ; 2020-05-10 ; First crack at recreating source code from bytes OCR'd ; from the SC84 newsletter, volume 2 number 1. ; ; Assembles at https://www.asm80.com ; ; The code shows it requires a Mostek Serial Timer Interrupt Controller. ; ; 2022-06-17 ; ; Renamed to end in .txt (instead of .z80) so it can be read online. ; This requires the following line: .cpu Z80 ; ; This now creates exactly the same hex file output ; as the newsletter OCR bytes. ; null equ 0 space equ 0x20 esc equ 0x1b BEL equ 0x07 BS equ 0x08 FF equ 0x0c LF equ 0x0a CR equ 0x0d DEL equ 0x7F making_original_buggy_version equ 0 ; from Wireless World, October 1984, pages 21-24 and 27 ; CTRL G (BEL) causes a 'beep' ; ; CTRL H (BS) backspaces the cursor one place without deleting. ; ; CTRL J (LF) moves the cursor down one line, scrolling the screen if necessary. ; ; CTRL L (FF) as for LF. ; ; CTRL M (CR) returns the cursor to the leftmost position of the current output line, ; clearing any characters to the right of the original cursor position, ; providing it was not already at the left margin. ; DEL (hex. 07F) backspaces the cursor one position, deleting the character onto which the cursor moves. ; ; VDUA also recognises the following ESCAPE sequences ; (ESCAPE being the hex. character 01 B, decimal 27 or CTRL [). ; ; ESC F selects reverse video display of subsequent ascii codes. ; ESC G selects normal video display of subsequent ascii codes. ; ESC H moves the cursor to the top left corner of the v.d.u. ; ESC J erases from cursor position to end of screen ; ESC K erases from cursor position to end of line ; ; ESC Y I c ; sets the cursor position to line I, column c. ; I and c are single hex. characters equating to ; the desired value plus 01F, ; i.e. the top left corner of the v.d.u. is 020, 020 ; and the bottom left corner (in mode 0) is 03F, 07F. LINE EQU 96 ; VDU chars per line FRAME EQU 32 ; VDU lines per frame ;; VDU1 EQU 0xA000 - LINE + FRAME ; set VDU start WRONG VDU1 EQU 0x9400 ; set VDU start ;; CRTH EQU > (VDU1 AND 03FH) ; high byte of VDU start ;; CRTL EQU < VDU1 ; low byte of VDU start CONTRL EQU 0E0H ; set basic port address for I/O port_0xe0 equ CONTRL + 0 port_0xe4 equ CONTRL + 4 port_0xe5 equ CONTRL + 5 port_0xe6 equ CONTRL + 6 port_0xe7 equ CONTRL + 7 port_0xe8 equ CONTRL + 8 ; MK3801 direct ports IDR EQU CONTRL + 010H ; Indirect Data Register GPIP EQU CONTRL + 011H ; General Purpose I/O-Interrupt IPRB EQU CONTRL + 012H ; Interrupt Pending Register B IPRA EQU CONTRL + 013H ; Interrupt Pending Register A ISRB EQU CONTRL + 014H ; Interrupt in-Service Register B ISRA EQU CONTRL + 015H ; Interrupt in-Service Register A IMRB EQU CONTRL + 016H ; Interrupt Mask Register B IMRA EQU CONTRL + 017H ; Interrupt Mask Register A PVR EQU CONTRL + 018H ; Pointer/Vector Register TABCR EQU CONTRL + 019H ; Timers A and B Control Register TBDR EQU CONTRL + 01AH ; Timer B Data Register TADR EQU CONTRL + 01BH ; Timer A Data Register UCR EQU CONTRL + 01CH ; USART Control Register RSR EQU CONTRL + 01DH ; Receiver Status Register TSR EQU CONTRL + 01EH ; Transmitter Status Register UDR EQU CONTRL + 01FH ; USART Data Register ; MK3801 indirect ports SCR EQU 0 ; Sync Character Register TDDR EQU 1 ; Timer D Data Register TCDR EQU 2 ; Timer C Data Register AER EQU 3 ; Active Edge Register IERB EQU 4 ; Interrupt Enable Register IERA EQU 5 ; Interrupt Enable Register DDR EQU 6 ; Data Direction Register TCDCR EQU 7 ; Timer C and D Control Register .org 0x0000 ; 0000 FIRMWARE_SIZE equ 0x07ee ; 0000 21 12 00 ld hl,FIRMWARE_TO_COPY ld de,FIRMWARE_DESTINATION ld bc,FIRMWARE_SIZE ldir ; 000b af xor a ; clear A ld (CURDRV),a ; 000f c3 39 f8 jp HIGH_ENTRY_POINT ; jump into copied code. ; 0012 FIRMWARE_TO_COPY: ; This is actually meant to run at F800, ; so these are just the code bytes expected. ; ; Disassembling these bytes yields ; wrong code and addresses. ; They are here just so that they can ; produce a file that can be compared with ; an original ROM image (if/when one becomes available). ; ; These bytes were disassembled online, using: ; https://onlinedisassembler.com ; and edited to a form acceptable to ; this online assembler: ; https://www.asm80.com ; ; See code at org $F800 later in this file. .phase 0xf800 ; FIRMWARE_DESTINATION ; Continue to produce code and data for loading at the current address ; but assemble instructions and define labels ; as if they originated at the given address. ; Useful when producing code that will be copied ; to a different location before being executed. FIRMWARE_DESTINATION: ; ; Starts with a jump table: ; ; HRESET: jp do_HRESET SRESET: jp do_SRESET VDUA: jp do_VDUA KEY1: jp do_KEY1 PARIN: jp do_PARIN PAROUT: jp do_PAROUT PRINT: jp do_PRINT VDUON: jp do_VDUON VDUOFF: jp do_VDUOFF KEY2: jp do_KEY2 KEY3: jp do_KEY3 KEY4: jp do_KEY4 RESDSK: jp do_RESDSK RDDSK: jp do_RDDSK WRDSK: jp do_WRDSK STEPR: jp do_STEPR PSCROL: jp do_PSCROL TIME: jp do_TIME SETUP: jp do_SETUP ; Function Description ; name ; ; HRESET Completely reinitializes system and returns to MCOS. ; ; SRESET Reenters MCOS without resetting RSTs to default values. ; ; VDUA Sends the character in A (the accumulator) to the v.d.u. ; Can process all ascii characters (020 to 07E) as well as certain ; control characters, escape sequences ; and reverse-video ascii characters. ; ; KEY1 Waits for a character to appear in the keyboard buffer, ; clears the buffer and returns the key code in A. ; Processes the paging key ; ; PARIN Reads an 8-bit byte from the parallel input port to A. ; ; PAROUT Sends the contents of A to the parallel output port. ; ; PRINT Sends the character in A to the serial output port. ; ; VDUON Switches the v.d.u. into the memory map at 08000 to 09FFF. ; ; VDUOFF Switches the v.d.u. out of memory map. ; ; KEY2 Tests keyboard buffer, ; returning 000 if empty ; or clearing the buffer and ; returning the key code if not. ; ; KEY3 Similar to KEY2, but processes the paging ; character and does not clear buffer. ; ; KEY4 Tests the keyboard buffer, ; returning 000 if empty ; or 0FF if not. ; Does not clear the buffer. ; ; RESDSK Resets (to track 00) and selects the ; specified disc unit. ; ; RDDSK Reads from the specified disc unit, track ; and sector to memory. ; ; WRDSK Writes to the specified disc unit, track and ; sector from memory. ; ; STEPR Sets the stepping rate for disc seek and ; restore operations by supplying code 018 ; to 01B in the A register. ; These four codes correspond to stepping rates of ; 3, 6, 10 and 15ms respectively ; when the interface is in the 8 inch mode, ; double these times in 5.25in mode. ; The slowest speed is the system default. ; ; PSCROL Sets the number of screen lines to take ; part in v.d.u. scrolling. Scrolling always ; occurs from the bottom of the screen, but ; this function can be used to keep a ; number of lines at the top of the screen ; stationary for applications such as mixed ; graph plotting and data output, applications ; progam menus and/or instructions. ; The number of scrolling lines is ; suppied in register A. ; ; TIME Creates a 10ms time delay. ; ; SETUP Sets standard v.d.u. mode (32 lines of 96 characters). ; ; ; HIGH_ENTRY_POINT: ; 0xf839 3e d0 ld a,0xd0 out (port_0xe4),a do_HRESET: ld hl,0x0000 ld de,Lff5e ; 0xf843 3e 08 ld a,0x08 loop_f845: ld (hl),0xc3 inc hl ex de,hl ; 0xf849 ed a0 ldi ; 0xf84b ed a0 ldi ; 0xf84d eb ex de,hl ; 0xf84e 01 05 00 ld bc,5 ; 0xf851 09 add hl,bc ; 0xf852 3d dec a jr nz,loop_f845 do_SRESET: ld sp,0 call subroutine_fa4b ; 0xf85b fb ei loop_f85c: ; cd e5 fa call subroutine_fae5 cp 0x13 jr z,skip_f870 ; 0xf863 fe 04 cp 0x04 jr nz,skip_f883 ; 0xf867 21 80 f7 ld hl,0xf780 ; 0xf86a dd 21 73 ff ld ix,Lff73 ; 0xf86e 18 07 jr skip_f877 skip_f870: ld hl,0x0080 ; 0xf873 dd 21 6e ff ld ix,SDEN skip_f877: push hl ; 0xf878 cd 5e fa call subroutine_fa5e loop_f87b: call do_RESDSK jr nz,loop_f87b jp DO_RDDSK skip_f883: ld b,a loop_f884: ld c,a ; 0xf885 cd e5 fa call subroutine_fae5 ; 0xf888 fe 20 cp space jr nz,loop_f884 ; 0xf88c 79 ld a,c ; 0xf88d 81 add a,c ; 0xf88e 80 add a,b ; 0xf88f fe d8 cp 0xd8 jr nz,skip_f8b2 ; 0xf893 cd 76 fb call subroutine_fb76 ; 0xf896 e5 push hl ; 0xf897 cd 73 fb call subroutine_fb73 ; 0xf89a c1 pop bc ; 0xf89b e5 push hl ; 0xf89c a7 and a ; 0xf89d ed 42 sbc hl,bc ; 0xf89f e3 ex (sp),hl ; 0xf8a0 c1 pop bc ; 0xf8a1 2b dec hl ; 0xf8a2 cd 7f fb call subroutine_fb7f ; 0xf8a5 e5 push hl ; 0xf8a6 d1 pop de ; 0xf8a7 85 add a,l ; 0xf8a8 6f ld l,a ; 0xf8a9 30 01 jr nc,skip_f8ac inc h skip_f8ac: ex de,hl ; 0xf8ad ed b8 lddr ; 0xf8af c3 55 f8 jp do_SRESET ; ; skip_f8b2: cp 0xe9 jr nz,skip_f8d2 loop_f8b6: call subroutine_fb76 call subroutine_fb7f ld (hl),a call subroutine_faf4 call subroutine_fa4b loop_f8c3: ld a,(KBF) ; read key or a jr z,loop_f8c3 ; repeat while zero ; ; okay, now you have a key ; ; 0xf8c9 e6 5f and 0x5f ; 0xf8cb fe 47 cp 'G' jr c,loop_f8b6 ; 0xf8cf c3 5c f8 jp loop_f85c skip_f8d2: cp 0xd5 jr nz,skip_f8fd ; 0xf8d6 cd 76 fb call subroutine_fb76 ; 0xf8d9 e5 push hl ; 0xf8da e5 push hl pop bc ; 0xf8dc cd 73 fb call subroutine_fb73 ; 0xf8df ed 42 sbc hl,bc ; 0xf8e1 e5 push hl pop bc ; 0xf8e3 e1 pop hl ; 0xf8e4 cd 7f fb call subroutine_fb7f ; 0xf8e7 5f ld e,a ; 0xf8e8 cd 7f fb call subroutine_fb7f call subroutine_fba5 loop_f8ee: cpir ; 0xf8f0 e2 55 f8 jp po,do_SRESET ; 0xf8f3 2b dec hl ; predecrement hl ld (hl),e ; 0xf8f5 f5 push af ; 0xf8f6 cd c7 fa call subroutine_fac7 ; 0xf8f9 23 inc hl ; 0xf8fa f1 pop af ; 0xf8fb 18 f1 jr loop_f8ee skip_f8fd: cp 0xf9 jr nz,skip_f919 ; 0xf901 cd 76 fb call subroutine_fb76 ; 0xf904 e5 push hl ; 0xf905 cd 73 fb call subroutine_fb73 ; 0xf908 c1 pop bc push bc ; 0xf90a a7 and a ; 0xf90b ed 42 sbc hl,bc ; 0xf90d e5 push hl pop bc ; 0xf90f cd 73 fb call subroutine_fb73 ; 0xf912 d1 pop de ; 0xf913 eb ex de,hl ; 0xf914 ed b0 ldir ; 0xf916 c3 55 f8 jp do_SRESET ; ; skip_f919: cp 0xde jr nz,skip_f928 ; 0xf91d cd 76 fb call subroutine_fb76 ; loop_f920: ld (hl),0xff ; 0xf922 2c inc l jr nz,loop_f920 jp do_SRESET ; ; skip_f928: cp 0xfc jr nz,skip_f93a ; 0xf92c 21 00 00 ld hl,0x0000 ; loop_f92f: ld (hl),0xff inc hl ; 0xf932 7c ld a,h ; is h == 0xf8 ? cp 0xf8 jr nz,loop_f92f ; 0xf937 c3 3d f8 jp do_HRESET ; yes, go to hard reset. ; ; skip_f93a: push af ; 0xf93b cd da fa call subroutine_fada ; 0xf93e 1b dec de ; 0xf93f 4a ld c,d ; 0xf940 00 nop ; 0xf941 f1 pop af ; 0xf942 fe d4 cp 0xd4 jr nz,skip_f996 ; 0xf946 cd 76 fb call subroutine_fb76 ; 0xf949 cd a5 fb call subroutine_fba5 ; 0xf94c e5 push hl loop_f94d: ; cd 38 fb call subroutine_fb38 loop_f950: call subroutine_fae5 ; 0xf953 fe 5f cp 0x5f ; '_' jr nz,skip_f979 ; 0xf957 2b dec hl ; 0xf958 7d ld a,l ; 0xf959 e6 0f and 0x0f ; low nibble ; 0xf95b fe 0f cp 0x0f jr nz,skip_f966 ; 0xf95f 3e 0d ld a,CR call do_VDUA ; 0xf964 18 e7 jr loop_f94d ; ; skip_f966: call subroutine_fb46 ; 0xf969 3a 47 ff ld a,(LPOS) ; 0xf96c d6 05 sub 0x05 ; 0xf96e 90 sub b ; 0xf96f 47 ld b,a loop_f970: ; 3e 7f ld a,0x7f ; 0xf972 cd 60 fc call do_VDUA ; 0xf975 10 f9 djnz loop_f970 ; 0xf977 18 d7 jr loop_f950 ; ; skip_f979: cp space jr z,skip_f98f ; 0xf97d cd 94 fb call subroutine_fb94 ; 0xf980 cd 85 fb call subroutine_fb85 ; 0xf983 77 ld (hl),a ; 0xf984 23 inc hl ; 0xf985 cd 12 fb call subroutine_fb12 ; 0xf988 20 c6 jr nz,loop_f950 ; 0xf98a cd a5 fb call subroutine_fba5 ; 0xf98d 18 be jr loop_f94d skip_f98f: pop hl ; 0xf990 cd f7 fa call subroutine_faf7 ; 0xf993 c3 55 f8 jp do_SRESET ; ; skip_f996: cp 0xee jr nz,skip_f99e ; 0xf99a cd 76 fb call subroutine_fb76 ; 0xf99d e9 jp (hl) ; ; skip_f99e: cp 0xe3 jr nz,skip_f9b7 ; 0xf9a2 cd 76 fb call subroutine_fb76 ; 0xf9a5 e5 push hl ; 0xf9a6 cd 73 fb call subroutine_fb73 ; 0xf9a9 cd a5 fb call subroutine_fba5 ; 0xf9ac d1 pop de ; 0xf9ad eb ex de,hl loop_f9ae: ld a,(de) ; 0xf9af be cp (hl) call nz,subroutine_fac7 ; 0xf9b3 13 inc de ; 0xf9b4 23 inc hl ; 0xf9b5 18 f7 jr loop_f9ae skip_f9b7: cp 0xce jr nz,skip_fa0d ; 0xf9bb 21 dc ff ld hl,0xffdc ; 0xf9be 39 add hl,sp ; 0xf9bf e5 push hl ; 0xf9c0 0e 00 ld c,0 ; loop_f9c2: ld a,(KBF) or a jr z,loop_f9c2 ; 0xf9c8 fe 1b cp esc jr z,skip_f9d4 ; 0xf9cc cd 7f fb call subroutine_fb7f ; 0xf9cf 77 ld (hl),a ; 0xf9d0 2b dec hl ; 0xf9d1 0c inc c ; 0xf9d2 18 ee jr loop_f9c2 ; ; skip_f9d4: call do_KEY2 ; 0xf9d7 0c inc c dec c jp z,do_SRESET ; 0xf9dc cd a5 fb call subroutine_fba5 ; 0xf9df e1 pop hl ; 0xf9e0 d9 exx ; 0xf9e1 21 00 00 ld hl,0 ; 0xf9e4 01 00 00 ld bc,0 ; 0xf9e7 d9 exx loop_f9e8: ld b,c ; 0xf9e9 e5 push hl ; 0xf9ea d1 pop de ; 0xf9eb 7e ld a,(hl) ; 0xf9ec d9 exx loop_f9ed: cpir ; 0xf9ef e2 55 f8 jp po,do_SRESET ; 0xf9f2 20 f9 jr nz,loop_f9ed ; 0xf9f4 e5 push hl loop_f9f5: exx ; 0xf9f6 1b dec de ; 0xf9f7 1a ld a,(de) ; 0xf9f8 10 0b djnz skip_fa05 ; 0xf9fa d9 exx pop hl push hl dec hl call subroutine_fac7 loop_fa01: pop hl ; 0xfa02 d9 exx ; 0xfa03 18 e3 jr loop_f9e8 skip_fa05: exx ; 0xfa06 ed a1 cpi ; 0xfa08 03 inc bc jr nz,loop_fa01 jr loop_f9f5 skip_fa0d: cp 0xf4 ; 0xfa0f cc ee fa call z,skip_faee ; 0xfa12 c3 55 f8 jp do_SRESET ; ; ; Lfa15: ; 0xfa15 e5 push hl ; 0xfa16 21 06 00 ld hl,0x0006 ; 0xfa19 f5 push af ; 0xfa1a 39 add hl,sp ; 0xfa1b f1 pop af ; 0xfa1c e3 ex (sp),hl ; 0xfa1d 08 ex af,af' ; 0xfa1e f5 push af ; 0xfa1f d9 exx ; 0xfa20 c5 push bc push de push hl ; 0xfa23 d9 exx ; 0xfa24 08 ex af,af' ; 0xfa25 f5 push af push bc push de push hl push iy push ix ; 0xfa2d 06 10 ld b,0x10 ; 0xfa2f 11 7a ff ld de,0xff7a loop_fa32: call subroutine_fba5 ; 0xfa35 0e 03 ld c,3 loop_fa37: ld a,(de) ; 0xfa38 13 inc de ; 0xfa39 cd b5 fb call subroutine_fbb5 ; 0xfa3c 0d dec c jr nz,loop_fa37 ; 0xfa3f cd 9d fb call subroutine_fb9d ; 0xfa42 e1 pop hl ; 0xfa43 cd 53 fb call subroutine_fb53 ; 0xfa46 10 ea djnz loop_fa32 ; 0xfa48 c3 55 f8 jp do_SRESET subroutine_fa4b: call subroutine_fa66 call subroutine_fada ; 0xfa51 20 0d db space, CR ; 0xfa53 20 52 db space db "READY" db space, space,space, null ret subroutine_fa5e: call subroutine_fada ; 0xfa61 1b dec de ; 0xfa62 48 ld c,b ; 0xfa63 1b dec de ; 0xfa64 4a ld c,d ; 0xfa65 00 nop subroutine_fa66: ld a,0xff ; 0xfa68 ed 47 ld i,a ; 0xfa6a ed 5e im 2 SCITAB_pairs equ (do_SETUP-SCITAB)/2 ; 0xfa6c 3e 14 ld a, SCITAB_pairs ; 0x14 ; size of table ; 0xfa6e cd b9 fa call subroutine_fab9 ; outputs the following table to output ports ; ; code above does not return to fall into the table. ; The return address is incremented past it, to do_SETUP. ; ; 0Xfa71 SCITAB: ; Pairs of output_address, data. ; IDR should be F0 ; IMRB should be F6 ; IMRA should be F7 ; PVR should be F8 ; GPIP should be F1 ; UCR should be FC ; RSR should be FD ; TSR should be FE ; 0283 db PVR,DDR ; Set GPIP bit 1 as output db IDR, 002H db GPIP, 002H ; and set it high (Rx disabled) db PVR, TCDR ; set baud rate (Rx) db IDR, 002H db PVR, TDDR ; set baud rate (Tx) db IDR, 002H db PVR, TCDCR ; select prescale of four on both db IDR, 011H db UCR, 098H ; set 8-bit, 2 stop bits db RSR, 001H ; enable Rx db TSR, 001H ; enable Tx db PVR, AER db IDR, 0C0H ; rising edge for FDC ints db IMRA, 0C0H db IMRB, 001H db PVR, IERA db IDR, 0C0H db PVR, IERB+8 ; enable keyboard int ; 0xfa97 f0 01 db IDR, 001H ; and set S bit ; db 0x21, 0xE7, 0xFE ; db 0x11, 0x40 ; 02B0 ; db 0xFF, 0x01, 0x09, 0x00 ; db 0xED, 0xB0, 0x11, 0x00 ; db 0x00, 0x06, 0x10, 0xCD ; db 0xB6, 0xFD, 0x56, 0xED ; 02C0 ; db 0x53, 0x00, 0x80, 0x23 ; db 0x1C, 0x10, 0xF7, 0xCD ; db 0xBE, 0xFD, 0xC9, 0xE3 ; db 0xC5, 0x47, 0x4E, 0x23 ; 02D0 ; db 0x7E, 0x23, 0xED, 0x79 ; db 0x10, 0xF8, 0xC1, 0xE3 ; db 0xC9, 0xCD, 0x53, 0xFB ; db 0x3A, 0x47, 0xFF, 0xFE ; 02E0 ; db 0x5C, 0xD2, 0xA5, 0xFB ; db 0xE6, 0x07, 0xC8, 0xCD ; db 0xA0, 0xFB, 0x18, 0xF0 ; 0xfa99 do_SETUP: ld hl,INIT1 ld de,WINDOW ld bc,9 ldir ; 0xfaa4 11 00 00 ld de,0x0000 ; 0xfaa7 06 10 ld b,0x10 ; 0xfaa9 cd b6 fd call do_VDUON loop_faac: ld d,(hl) ; 0xfaad ed 53 00 80 ld (0x8000),de ; 0xfab1 23 inc hl ; 0xfab2 1c inc e ; 0xfab3 10 f7 djnz loop_faac ; 0xfab5 cd be fd call do_VDUOFF ret subroutine_fab9: ; outputs the table after the following table to output ports ex (sp),hl ; swap hl and top of stack push bc ; save ld b,a ; get byte count loop_fabc: ld c,(hl) ; get the i/o address, put in register C inc hl ; 0xfabe 7e ld a,(hl) inc hl ; 0xfac0 ed 79 out (c),a djnz loop_fabc ; 0xfac4 c1 pop bc ; restore ex (sp),hl ; swap hl and top of stack ret subroutine_fac7: call subroutine_fb53 loop_faca: ld a,(LPOS) ; 0xfacd fe 5c cp 0x5c jp nc,subroutine_fba5 ; 0xfad2 e6 07 and 7 ret z ; 0xfad5 cd a0 fb call subroutine_fba0 ; 0xfad8 18 f0 jr loop_faca subroutine_fada: ex (sp),hl ; 0xfadb 7e ld a,(hl) ; 0xfadc 23 inc hl ; 0xfadd e3 ex (sp),hl ; 0xfade b7 or a ; 0xfadf c8 ret z ; 0xfae0 cd 60 fc call do_VDUA ; 0xfae3 18 f5 jr subroutine_fada subroutine_fae5: call subroutine_fbb2 ; 0xfae8 fe 60 cp 0x60 ret c ; 0xfaeb d6 20 sub 0x20 ; make upper case? ret skip_faee: ; 0xfaee cd 76 fb call subroutine_fb76 ; 0xfaf1 22 78 ff ld (variable_word_ff78),hl subroutine_faf4: ld hl,(variable_word_ff78) subroutine_faf7: call subroutine_fada ; 0xfafa 1b dec de ; 0xfafb 48 ld c,b ; 0xfafc 00 nop ; 0xfafd 0e 1f ld c,0x1f loop_faff: call subroutine_fba5 call subroutine_fb38 loop_fb05: call subroutine_fb5d inc hl call subroutine_fb12 jr nz,loop_fb05 ; 0xfb0e 0d dec c ; 0xfb0f 20 ee jr nz,loop_faff ret subroutine_fb12: call subroutine_fba0 ; not do_VDUOFF ; 0xfb15 7d ld a,l ; 0xfb16 e6 03 and 0x03 ; 0xfb18 cc 9d fb call z,subroutine_fb9d ; 0xfb1b 7d ld a,l ; 0xfb1c e6 0f and 0x0f ; 0xfb1e c0 ret nz ; 0xfb1f 11 f0 ff ld de,0xfff0 ; 0xfb22 19 add hl,de ; 0xfb23 06 10 ld b,0x10 loop_fb25: ld a,(hl) ; 0xfb26 23 inc hl ; 0xfb27 fe 20 cp space jr c,skip_fb2f ; 0xfb2b fe 7f cp DEL jr c,skip_fb31 skip_fb2f: ld a,0x2e ; '.' skip_fb31: call subroutine_fbb5 ; 0xfb34 10 ef djnz loop_fb25 ; 0xfb36 af xor a ret subroutine_fb38: call subroutine_fb53 ; 0xfb3b c5 push bc ; 0xfb3c cd 46 fb call subroutine_fb46 ; 0xfb3f c4 a0 fb call nz,subroutine_fba0 ; not do_VDUOFF ; 0xfb42 10 fb djnz 0xfb3f ; 0xfb44 c1 pop bc ret subroutine_fb46: ld a,l ; 0xfb47 e6 0f and 0x0f ret z ; 0xfb4a 4f ld c,a and 0x0c rrca add a,c add a,c add a,c ld b,a ret subroutine_fb53: ld a,h ; 0xfb54 cd 5e fb call subroutine_fb5e ; 0xfb57 7d ld a,l ; 0xfb58 cd 5e fb call subroutine_fb5e ; 0xfb5b 18 43 jr subroutine_fba0 subroutine_fb5d: ld a,(hl) subroutine_fb5e: push af ; 0xfb5f 07 rlca ; 0xfb60 07 rlca ; 0xfb61 07 rlca ; 0xfb62 07 rlca ; 0xfb63 cd 67 fb call subroutine_fb67 ; 0xfb66 f1 pop af subroutine_fb67: and 0xf cp 10 ; ten jr c,skip_fb6f add a,7 ; hex A to ASCII A skip_fb6f: add a,'0' jr subroutine_fbb5 subroutine_fb73: call subroutine_fba0 subroutine_fb76: call subroutine_fb82 ; 0xfb79 67 ld h,a ; 0xfb7a cd 82 fb call subroutine_fb82 ; 0xfb7d 6f ld l,a ret subroutine_fb7f: call subroutine_fba0 subroutine_fb82: call subroutine_fb91 subroutine_fb85: push bc ; 0xfb86 07 rlca ; 0xfb87 07 rlca ; 0xfb88 07 rlca ; 0xfb89 07 rlca ; 0xfb8a 47 ld b,a ; 0xfb8b cd 91 fb call subroutine_fb91 ; 0xfb8e 80 add a,b ; 0xfb8f c1 pop bc ; 0xfb90 c9 ret subroutine_fb91: call subroutine_fbb2 subroutine_fb94: cp 0x41 jr c,skip_fb9a add a,9 skip_fb9a: and 0x0f ret subroutine_fb9d: call subroutine_fba0 subroutine_fba0: push af ld a,space jr skip_fbad subroutine_fba5: push af ld a,CR call subroutine_fbb5 ld a,LF skip_fbad: call subroutine_fbb5 ; 0xfbb0 f1 pop af ret subroutine_fbb2: call do_KEY1 subroutine_fbb5: call do_VDUA ; 0xfbb8 f5 push af ; save ; 0xfbb9 db e0 in a,(port_0xe0) and 0x80 ; test bit 7 jr nz,pop_af_and_return ; 0xfbbf f1 pop af ; restore ; 0xfbc0 f5 push af ; save ; 0xfbc1 cd ce fe call do_PRINT pop_af_and_return: pop af ; restore ret subroutine_fbc6: ex (sp),hl push de push bc call subroutine_fbd0 pop_bc_de_hl_and_return: pop bc pop de pop hl ret subroutine_fbd0: jp (hl) subroutine_fbd1: ; 0xfbd1 e3 ex (sp),hl ; 0xfbd2 d5 push de push bc ; push af call subroutine_fbd0 pop af ; ; 0xfbd9 18 f1 jr pop_bc_de_hl_and_return do_KEY3: ld a,(KBF) cp 0x1d ; ascii GS Group separator ret nz ; 0xfbe1 cd 34 fc call do_KEY2 jr Lfc17 do_KEY1: push hl ; 0xfbe7 2a 44 ff ld hl,(CURSOR) ; 0xfbea cd b6 fd call do_VDUON ; 0xfbed cd 20 fd call subroutine_fd20 ; 0xfbf0 21 0a 68 ld hl,0x680a ld (0x8000),hl ; 0xfbf6 cd be fd call do_VDUOFF loop_fbf9: call do_KEY2 ; 0xfbfc 28 fb jr z,loop_fbf9 ; 0xfbfe cd b6 fd call do_VDUON ; 0xfc01 21 0a 08 ld hl,0x080a ld (0x8000),hl ; 0xfc07 cd be fd call do_VDUOFF ; 0xfc0a e1 pop hl ; 0xfc0b cd 11 fc call subroutine_fc11 ; 0xfc0e 28 d6 jr z,do_KEY1 ret subroutine_fc11: call subroutine_fc25 ; 0xfc14 fe 1d cp 0x1d ret nz Lfc17: ld a,(SCNOW) ; 0xfc1a b7 or a ; 0xfc1b 3e 00 ld a,0x00 ; 0xfc1d 20 01 jr nz,skip_fc20 ; 0xfc1f 3c inc a skip_fc20: ld (SCNOW),a ; 0xfc23 af xor a ret subroutine_fc25: push af ld a,(SCNOW) or a ; 0xfc2a 28 06 jr z,skip_fc32 ; 0xfc2c 3a 42 ff ld a,(SCMAX) ld (SCNOW),a skip_fc32: pop af ret do_KEY2: ld a,(KBF) ; if key is zero, return or a ret z ; else clear keyboard buffer ; 0xfc39 e5 push hl push de push bc ; ; 0xfc3c 21 4f ff ld hl,KBF+1 ; 0xff4f ; 0xfc3f e5 push hl ; 0xfc40 d1 pop de dec de ; 0xfc42 1a ld a,(de) ld bc,15 ; size of buffer ldir ; do bc times ; 0xfc48 c1 ; ; pop bc pop de pop hl ret do_KEY4: ld a,(KBF) or a ret z ; 0xfc51 3e ff ld a,0xff ; 0xfc53 c9 ret do_TIME: push af loop_fc55: ld a,0x6f loop_fc57: ex (sp),hl ; 0xfc58 e3 ex (sp),hl ; 0xfc59 3d dec a ; 0xfc5a 20 fb jr nz,loop_fc57 ; 0xfc5c 10 f7 djnz loop_fc55 ; 0xfc5e f1 pop af ret ; ; do_VDUA: call subroutine_fbd1 ; 0xfc63 cd b6 fd call do_VDUON ; 0xfc66 01 be fd ld bc,0xfdbe ; 0xfc69 c5 push bc ; 0xfc6a 21 f1 fc ld hl,variable_byte_fcf1 ; 0xfc6d 34 inc (hl) ; 0xfc6e 35 dec (hl) ; 0xfc6f 20 08 jr nz,skip_fc79 ; 0xfc71 fe 1b cp esc jp nz,skip_fcf4 ; 0xfc76 cb fe set 7,(hl) ret ; ; skip_fc79: bit 7,(hl) ; 0xfc7b 28 4a jr z,skip_fcc7 ; 0xfc7d 36 00 ld (hl),0x00 ; 0xfc7f 32 f2 fc ld (variable_byte_fcf2),a ; 0xfc82 fe 48 cp 0x48 jr nz,skip_fc8f ; 0xfc86 cd 25 fc call subroutine_fc25 ; 0xfc89 af xor a ; 0xfc8a 2a 40 ff ld hl,(WINDOW) ; 0xfc8d 18 60 jr 0xfcef ; ; skip_fc8f: cp 0x4a jr nz,skip_fc9f ; 0xfc93 2a 44 ff ld hl,(CURSOR) ; 0xfc96 3e a0 ld a,0xa0 loop_fc98: ld (hl),space ; 0xfc9a 23 inc hl ; 0xfc9b bc cp h jr nz,loop_fc98 ret ; ; skip_fc9f: cp 0x4b jr nz,skip_fcb4 ; 0xfca3 2a 44 ff ld hl,(CURSOR) ; 0xfca6 3a 47 ff ld a,(LPOS) subroutine_fca9: sub 0x60 jr nc,subroutine_fca9 loop_fcad: ld (hl),space ; 0xfcaf 23 inc hl ; 0xfcb0 3c inc a ; 0xfcb1 20 fa jr nz,loop_fcad ret skip_fcb4: cp 0x59 jr nz,skip_fcbb ; 0xfcb8 36 02 ld (hl),0x02 ret skip_fcbb: cp 0x46 jr 0xfcc3 ; skip_fcbf: cp 0x47 jr nz,skip_fcc7 ; 0xfcc3 32 f3 fc ld (variable_byte_fcf3),a ; 0xfcc6 c9 ret ; ; skip_fcc7: sub space ; 0xfcc9 4f ld c,a ; 0xfcca 3a f2 fc ld a,(variable_byte_fcf2) ; 0xfccd fe 59 cp 0x59 ret nz ; 0xfcd0 35 dec (hl) ; 0xfcd1 28 12 jr z,skip_fce5 ; 0xfcd3 79 ld a,c ; 0xfcd4 fe 20 cp space ret nc ; 0xfcd7 af xor a ; 0xfcd8 2a 40 ff ld hl,(WINDOW) ; 0xfcdb 11 60 00 ld de,0x0060 ; 0xfcde 0c inc c ; 0xfcdf 0d dec c jr z,skip_fcef ; 0xfce2 19 add hl,de ; 0xfce3 18 fa jr 0xfcdf skip_fce5: ld a,c ; 0xfce6 fe 60 cp 0x60 ret nc ; 0xfce9 06 00 ld b,0x00 ; 0xfceb 2a 44 ff ld hl,(CURSOR) ; 0xfcee 09 add hl,bc skip_fcef: jr 0xfd1a variable_byte_fcf1: db 00 variable_byte_fcf2: db 00 variable_byte_fcf3: db 0x47 skip_fcf4: ld hl,($FF44) ; 2A 44 ff ; 0xfcf7 fe 7f cp DEL jr nz,skip_fd04 ; 0xfcfb 36 20 ld (hl),space loop_fcfd: dec hl ; 0xfcfe 3a 47 ff ld a,(LPOS) ; 0xfd01 3d dec a ; 0xfd02 18 16 jr 0xfd1a ; ; skip_fd04: cp space jr c,skip_fd2c ; 0xfd08 cd 8e fd call subroutine_fd8e ; 0xfd0b 77 ld (hl),a ; 0xfd0c 3a f3 fc ld a,(variable_byte_fcf3) cp 0x46 jr nz,skip_fd15 set 7,(hl) skip_fd15: inc hl ; 0xfd16 3a 47 ff ld a,(LPOS) ; 0xfd19 3c inc a ; 0xfd1a 32 47 ff ld (LPOS),a ; 0xfd1d 22 44 ff ld (CURSOR),hl subroutine_fd20: ld a,l ; 0xfd21 2e 0e ld l,0x0e ; 0xfd23 22 00 80 ld (0x8000),hl ; 0xfd26 2c inc l ; 0xfd27 67 ld h,a ; 0xfd28 22 00 80 ld (0x8000),hl ; 0xfd2b c9 ret skip_fd2c: cp BS jr z,loop_fcfd ; 0xfd30 fe 0d cp CR jr nz,skip_fd42 ; 0xfd34 3a 47 ff ld a,(LPOS) ; 0xfd37 a7 and a ; 0xfd38 c8 ret z ; 0xfd39 cd a9 fc call subroutine_fca9 ; 0xfd3c 11 a0 ff ld de,0xffa0 ; 0xfd3f 19 add hl,de ; 0xfd40 18 d8 jr 0xfd1a skip_fd42: cp BEL jr nz,skip_fd57 ; 0xfd46 0e 00 ld c,0 ; 0xfd48 3a 49 ff ld a,(CURDRV) loop_fd4b: xor 0x02 ; 0xfd4d d3 e0 out (port_0xe0),a ; 0xfd4f 06 c0 ld b,0xc0 loop_fd51: djnz loop_fd51 ; 0xfd53 0d dec c jr nz,loop_fd4b ; ret skip_fd57: cp FF jr z,skip_fd5e ; 0xfd5b fe 0a cp LF ret nz skip_fd5e: ld a,(SCNOW) ; 0xfd61 b7 or a jr z,skip_fd6a ; 0xfd64 3d dec a jr z,skip_fd73 ; 0xfd67 32 43 ff ld (SCNOW),a skip_fd6a: ld de,0x0060 ; 0xfd6d 19 add hl,de ; 0xfd6e cd 8e fd call subroutine_fd8e ; 0xfd71 18 aa jr 0xfd1d skip_fd73: ld de,0x400a ; 0xfd76 ed 53 00 80 ld (0x8000),de loop_fd7a: call do_KEY4 ; 0xfd7d 28 fb jr z,loop_fd7a ; 0xfd7f 11 0a 08 ld de,0x080a ; 0xfd82 ed 53 00 80 ld (0x8000),de ; 0xfd86 cd 34 fc call do_KEY2 ; 0xfd89 cd 11 fc call subroutine_fc11 ; 0xfd8c 18 dc jr 0xfd6a subroutine_fd8e: push af ; 0xfd8f 7c ld a,h ; 0xfd90 fe a0 cp 0xa0 jr c,skip_fdb4 ; 0xfd94 2a 40 ff ld hl,(WINDOW) ; 0xfd97 c5 push bc ; 0xfd98 e5 push hl ; 0xfd99 11 60 00 ld de,0x0060 ; 0xfd9c 19 add hl,de ; 0xfd9d e5 push hl ; 0xfd9e d1 pop de ; 0xfd9f 21 00 a0 ld hl,0xa000 ; 0xfda2 a7 and a ; 0xfda3 ed 52 sbc hl,de ; 0xfda5 e5 push hl ; 0xfda6 c1 pop bc ; 0xfda7 e1 pop hl ; 0xfda8 eb ex de,hl ; 0xfda9 ed b0 ldir ; 0xfdab eb ex de,hl ; 0xfdac c1 pop bc ; 0xfdad e5 push hl loop_fdae: ld (hl),space ; 0xfdb0 2c inc l subroutine_fdb1: jr nz,loop_fdae ; 0xfdb3 e1 pop hl skip_fdb4: pop af ret do_VDUON: push af ld a,(CURDRV) or 0x04 jr 0xfdc4 do_VDUOFF: push af ld a,(CURDRV) and 0xfb ; 0xfdc4 d3 e0 out (port_0xe0),a ; 0xfdc6 32 49 ff ld (CURDRV),a ; 0xfdc9 f1 pop af ; 0xfdca c9 ret do_PSCROL: push hl push de ; 0xfdcd 32 42 ff ld (SCMAX),a ; 0xfdd0 21 00 a0 ld hl,0xa000 ld de,0xffa0 add hl,de ; 0xfdd7 3d dec a jr nz,0xfdd6 ; duff jump ??? ; 0xfdda 22 40 ff ld (WINDOW),hl ; 0xfddd d1 pop de pop hl ret do_PARIN: in a,(port_0xe8) ret do_PAROUT: out (port_0xe8),a ret do_RESDSK: call subroutine_fbc6 call subroutine_fe28 ld (CURDRV),a out (port_0xe0),a ld a,(STEP) ; 0xfdf4 e6 0f and 0x0f ; 0xfdf6 cd 7d fe call subroutine_fe7d ; 0xfdf9 e6 10 and 0x10 ; 0xfdfb c9 ret do_RDDSK: call subroutine_fbc6 ; 0xfdff 11 84 fe ld de,0xfe84 subroutine_fe02: call subroutine_fe36 ; 0xfe05 3e 80 ld a,0x80 ; 0xfe07 cd 7b fe call subroutine_fe7b ; 0xfe0a e6 1c and 0x1c ret do_WRDSK: call subroutine_fbc6 ; 0xfe10 11 8a fe ld de,0xfe8a call subroutine_fe36 ; 0xfe16 3e a0 ld a,0xa0 call subroutine_fe7b ; 0xfe1b e6 7c and 0x7c ret nz ; 0xfe1e 11 90 fe ld de,0xfe90 call subroutine_fe02 ; 0xfe24 c8 ret z ; 0xfe25 f6 02 or 2 ret subroutine_fe28: ld a,(ix+0) ; 0xfe2b e6 03 and 0x03 ; 0xfe2d 4f ld c,a ; 0xfe2e 06 00 ld b,0x00 ; 0xfe30 21 4a ff ld hl,DRVTAB ; 0xfe33 09 add hl,bc ; 0xfe34 7e ld a,(hl) ; 0xfe35 c9 ret subroutine_fe36: call subroutine_fe28 ; 0xfe39 47 ld b,a ; 0xfe3a 21 49 ff ld hl,CURDRV ; 0xfe3d ae xor (hl) ; 0xfe3e e6 f0 and 0xf0 ; 0xfe40 f5 push af ; 0xfe41 7e ld a,(hl) ; 0xfe42 e6 0e and 0x0e ; 0xfe44 b0 or b ; 0xfe45 77 ld (hl),a ; 0xfe46 d3 e0 out (port_0xe0),a ; 0xfe48 f1 pop af if making_original_buggy_version ; 0xfe49 c4 6b fe call nz,call_fe6b ; 0xfe4c dd 46 01 ld b,(ix+1) ; 0xfe4f db e5 in a,(port_0xe5) else ; 0xfe49 db e5 in a,(port_0xe5) ; 0xfe4b c4 6b fe call nz,call_fe6b ; 0xfe4e dd 46 01 ld b,(ix+1) endif ; 0xfe51 b8 cp b ; 0xfe52 78 ld a,b ; 0xfe53 d3 e7 out (port_0xe7),a ; 0xfe55 3a 48 ff ld a,(STEP) ; 0xfe58 c4 7d fe call nz,subroutine_fe7d ; 0xfe5b dd 7e 02 ld a,(ix+2) ; 0xfe5e d3 e6 out (port_0xe6),a ; 0xfe60 dd 6e 03 ld l,(ix+3) ; 0xfe63 dd 66 04 ld h,(ix+4) ; 0xfe66 ed 53 1e ff ld (0xff1e),de ; 0xfe6a c9 ret call_fe6b: ld hl,0xfe90 ; 0xfe6e 22 1e ff ld (0xff1e),hl ; 0xfe71 3e c0 ld a,0xc0 ; 0xfe73 cd 7d fe call subroutine_fe7d ; 0xfe76 db e6 in a,(port_0xe6) ; 0xfe78 d3 e5 out (port_0xe5),a ; 0xfe7a c9 ret subroutine_fe7b: ld c,0xe7 subroutine_fe7d: out (port_0xe4),a ; 0xfe7f 37 scf ; 0xfe80 da 80 fe jp c,0xfe80 ; loop forever? ; 0xfe83 c9 ret ; 0xfe84 ed a2 ini ; 0xfe86 37 scf ; 0xfe87 fb ei ; 0xfe88 ed 4d reti ; 0xfe8a ed a3 outi ; 0xfe8c 37 scf ; 0xfe8d fb ei ; 0xfe8e ed 4d reti ; 0xfe90 db e7 in a,(port_0xe7) ; 0xfe92 37 scf ; 0xfe93 fb ei ; 0xfe94 ed 4d reti INTRQ: ; 0xfe96 db e4 in a,(port_0xe4) or a ei reti do_STEPR: ld (STEP),a ret Lfea0: ; 0xfea0 f5 push af ; 0xfea1 db e0 in a,(port_0xe0) ; 0xfea3 e6 7f and DEL jr nz,skip_feb2 ; 0xfea7 3e d0 ld a,0xd0 ; 0xfea9 d3 e4 out (port_0xe4),a ; 0xfeab f1 pop af ; 0xfeac 21 3d f8 ld hl,do_HRESET ; 0xfeaf e3 ex (sp),hl ; 0xfeb0 18 19 jr skip_fecb skip_feb2: push hl push bc ; 0xfeb4 21 4d ff ld hl,0xff4d ; 0xfeb7 4f ld c,a ; 0xfeb8 06 0f ld b,0x0f ; 0xfeba af xor a loop_febb: inc hl ; 0xfebc be cp (hl) ; 0xfebd 28 08 jr z,0xfec7 ; duff jump? ; 0xfebf 10 fa djnz loop_febb ; 0xfec1 3e 07 ld a,BEL ; 0xfec3 cd 60 fc call do_VDUA ; 0xfec6 fe 71 cp 0x71 ; 0xfec8 c1 pop bc pop hl pop af skip_fecb: ei reti ; 0xfece do_PRINT: push af ; save register and flags PRINT1: ;; in a,(port_0xf1) in a,(GPIP) ; wait for handshake ready bit 2,a jr nz,PRINT1 PRINT2: ;; in a,(port_0xfe) in a,(TSR) ; wait for UART ready bit 7,a jr z,PRINT2 ; 0xfedb f1 pop af ;; out (port_0xff),a out (UDR),a ; output byte ret ; 0xfedf 00 nop ; 0xfee0 00 nop ; 0xfee1 00 nop ; 0xfee2 00 nop ; 0xfee3 00 nop ; 0xfee4 00 nop ; 0xfee5 00 nop ; 0xfee6 00 nop INIT1: ; 0xfee7 00 94 defw VDU1 ; default ; 0xfee9 20 20 defb FRAME,FRAME ; default ; 0xfeeb 00 94 defw VDU1 ; default cursor position ; 0xfeed 00 defb 000H ; dummy ; 0xfeee 00 defb 000H ; default line position ; 0xfeef 1b defb 01BH ; default step rate (slowest) ; ; ; CRTC: ; 0xfef0 defb 07FH ; 0xfef1 defb LINE ; 0xfef2 defb 68H ; 0xfef3 defb 38H defb 21H ; 0xfef5 defb 07H ; 0xfef6 defb FRAME defb FRAME ; 0xfef8 defb 50H ; 0xfef9 defb 08H ; 0xfefa defb 08H ; 0xfefb defb 08H ; 0xfefc defb 14H ; 0xfefd defb 00H ; 0xfefe defb 00H ; 0xfeff defb 00H SIIVEC: ; 0xff00 defW Lfea0 ; 0xff02 defw 0000H ; 0xff04 defw 0000H ; 0xff06 defw 0000H ; 0xff08 defw 0000H ; 0xff0a defw 0000H ; 0xff0c defw 0000H ; 0xff0e defw 0000H ; 0xff10 defw 0000H ; 0xff12 defw 0000H ; 0xff14 defw 0000H ; 0xff16 defw 0000H ; 0xff18 defw 0000H ; 0xff1a defw 0000H ; 0xff1c 96 FE defw INTRQ ; FE96 ; 0xff1e defw 0000H ; 0xff20 ;; DS 020H ; reserved for expansion ; DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; reserved for expansion ; 0xff40 WINDOW: defw 0000H ; VDU start address ; 0xff42 SCMAX: defb 00H ; scroll limit ; 0xff43 SCNOW: defb 00H ; lines scrolled / scroll flag ; 0xff44 CURSOR: defw 0000H ; cursor position ; 0xff46 KEYBUF: defb 00H ; ; 0xff47 LPOS: defb 00 ; line position (00-5FH) ; 0xff48 STEP: defb 00 ; disc stepper rate ; 0xff49 CURDRV defb 00 ; image of control port ; 0xff4a DRVTAB: defb $10 defb $20 defb $11 defb $21 ; ; ; 0xff4e KBF: ;; DS 010H ; keyboard buffer DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; keyboard buffer Lff5e: .dw do_SRESET ; 0xff60 defw 0000H ; 0xff62 defw 0000H ; 0xff64 defw 0000H ; 0xff66 defw 0000H ; 0xff68 defw 0000H ; 0xff6a defw 0000H ; 0xff6c defw Lfa15 ; 0xff6e 00 00 SDEN: defb 00H defb 00H ; 0xff70 defb 01H defw 0080H Lff73: defb 00H ; 0xff74 defb 00H ; 0xff75 defb 01 defw 0f600H variable_word_ff78: defw 0000H ; ; register name strings ; ; 0xff7a 49 58 20 49 db "IX IY " db "HL DE " db "BC AF " db "HL'DE'" db "BC'AF'" db "SP AT " db "S " db "S " db "S " db "S " ; 0xffaa ff blank EPROM values. db 0xff db 0xff db 0xff ; 0xffad ff db 0xff ; ; The ROM data from the newsletter OCR ends here. ; However I shall assume the rest of the boot ROM is blank. ; ; ; 07C0 db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF ; 07D0 db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF ; 07E0 db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF ; 07F0 db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF ; 07F8 db 0xFF, 0xFF, 0xFF, 0xFF db 0xFF, 0xFF, 0xFF, 0xFF .end