; Disassembly of the file "C:\HD64180\SYSTEC\D0001\SYSTEC01.BIN" ; 15.08.2008 HR ole ; 23.12.2007 HR ; ; System Equates ; RESETSYS: EQU 13 ; Reset disk system PRINTBUF: EQU 09 ; Print string OPENZFUNC: EQU 15 ; Open function READZFUNC: EQU 20 ; Read sequential SETDMAZFUNC: EQU 26 ; Set dma address ; equates for non graphic characters ; RUBOUT: EQU 7FH ; char delete TAB: EQU 09H ; tab char DMAPORT: EQU 60H ; CTC BAUSTEIN SYSCTC: EQU 10H ;ADR CTC-BAUSTEIN ;---------------------------------------- SYSCTC0: EQU SYSCTC ;CHANNEL 0 SYSCTC1: EQU SYSCTC+1 ;CHANNEL 1 SYSCTC2: EQU SYSCTC+2 ;CHANNEL 2 SYSCTC3: EQU SYSCTC+3 ;CHANNEL 3 l0000: EQU 0000H BIN31H: EQU 00110001b BIN51H: EQU 01010001b BIN75V1H: EQU 01110101b ; REGISTER-PORT FDC ; 0C0H Kommando-Register ; 0C1H Spur-Register ; 0C2H Sektor-Register ; 0C3H Daten-Register ; Status-Bits FDC ; S7 NOT READY Laufwerk ist nicht bereit ; S6 WRITE PROTECT Eingelegte Diskette ist schreibgeschützt ; S5 HEAD LOADED Kopf ist geladen ; S4 SEEK ERROR Spur nicht gefunden ; S3 CRC ERROR Prüfsummenfehler ; S2 TRACK0 Kopf befindet sich über Spur 0 ; S1 INDEX Indexloch befindet sich im Strahl der Index-Lichtschranke ; S0 BUSY Gesetzt, wenn der FDC-Baustein ein Kommando ausführt ; LD A,1H ; Kommando RESTORE 00000001B ; OUT (0C0H),A ; Ausgabe in das Kommando-Register ; LD A,08H ; Spur 8 festlegen ; OUT (0C3H),A ; Ausgabe in das Daten-Register SEEKK: EQU 00010111B ; 17H 23 dez ; GRUPPE I ; ; ; LD A,17H ; Seek-Kommando 00010111B ; OUT (0C0H),a ; Ausgabe in das Kommando-Register ; STEP IN ; LD A,51H ; STEP IN-Kommando-Wort 01010001b ; OUT (0C0H),A ; Ausgabe in das Kommando-Register ; STEP OUT ; LD A,75H ; STEP OUT--Kommando-Wort 01110101b ; OUT (0C0H),A ; Ausgabe in das Kommando-Register ; STEP ; LD A,31H ; STEP-Kommando-Wort 00110001b 12 ms ; OUT (0C0H),A ; Ausgabe in das Kommando-Register ; GRUPPE II ; ; ; S7 NOT READY Laufwerk ist nicht bereit ; S6 WRITE PROTECT Eingelegte Diskette ist schreibgeschützt ; S5 RECORD TYP/WRITE FAULT ; S4 RECORD NOT FOUND Sektor nicht gefunden ; S3 CRC ERROR Prüfsummenfehler ; S2 LOST DATA Datenverlust bei der Datenübertragung ; S1 DATA REQUEST Anforderung zur Datenübertragung ; S0 BUSY Gesetzt, wenn der FDC-Baustein ein Kommando ausführt READSECK: EQU 10000000B ; 80H 128 dez ; READ SECTOR-Kommando-Wort 10000000B ; WRITESECK: EQU 10100000B ; 0A0H 160 dez ; WRITE SECTOR-Kommando-Wort 10100000B ; READAD: EQU 11000000B ; 0C0H 192 dez READTR: EQU 11100000B ; 0E0H 224 dez WRITETR: EQU 11110000B ; 0F0H 240 dez le000: EQU 0E000H BIOS: EQU 0E000H l0010: EQU 0010h l0011: EQU 0011H l0030: EQU 0030H TESTSPGR1: EQU 8000H TESTSPGR2: EQU 8192 ; 2000H TESTSPGR3: EQU 8000H+8192+8192+8192 ; 0E000H TESTSPGR4: EQU 8000H+8192+8192+8192+8192 ; 10000H TESTSP1: EQU 65536 TESTB: EQU 11111111B * 257 l0080: EQU 0080H ACON: EQU 0C6h ; Z80-SIO ADATA: EQU 0C4h ; Z80-SIO ; BINAER-CODE Tabelle BIN70H: EQU 01110000B BIN71H: EQU 01110001B BIN72H: EQU 01110010B BIN73H: EQU 01110011B BIN74H: EQU 01110100B BIN75H: EQU 01110101B BIN76H: EQU 01110110B BIN77H: EQU 01110111B BIN78H: EQU 01111000B BIN79H: EQU 01111001B BIN80H: EQU 10000000B BIN81H: EQU 10000001B BIN82H: EQU 10000010B BIN83H: EQU 10000011B BIN84H: EQU 10000100B BIN85H: EQU 10000101B BIN86H: EQU 10000110B BIN87H: EQU 10000111B BIN88H: EQU 10001000B BIN0C0: EQU 11000000B ; C0H 192 DEZ BIN0D0: EQU 11010000B ; D0H 208 DEZ BIN0E0: EQU 11100000B ; E0H 224 DEZ BIN0F0: EQU 11110000B ; F0H 240 DEZ BIN0FF: EQU 11111111B ; FFH 255 DEZ ; PORT86: EQU 60H ;ECB-BUS-SCHNITTSTELLE ; ; ; ; ;--------------------------------------------- ; ;KOMMANDOS FUER WD 2797: ;----------------------- ; ; RDMCMD: EQU 98H ;READ MULTIPLE-SEKTOR-KOMMANDO WRMCMD: EQU 0B8H ;WRITE MULTIPLE-SEKTOR-KOMMANDO RDCMD: EQU 88H ;READ-KOMMANDO RDCMDE: EQU 8CH ;READ-KOMMANDO MIT E-FLAG WRCMD: EQU 0A8H ;WRITE-KOMMANDO WRCMDE: EQU 0ACH ;WRITE-KOMMANDO MIT E-FLAG SEEKNV: EQU 18H ;SEEK-KOMMANDO OHNE VERIFY SEEK: EQU 1CH ;SEEK-KOMMANDO REST: EQU 08H ;RESTORE TO TRK0 STEPI: EQU 58H ;STEP-IN-KOMMANDO STEPO: EQU 78H ;STEP-OUT-KOMMANDO RACMD: EQU 0C0H ;READ-ADRESS-KOMMANDO RDTRK: EQU 0E0H ;READ-TRACK-KOMMANDO WRTRK: EQU 0F4H ;WRITE-TRACK-KOMMANDO FORCED: EQU 0D0H ;FORCE INTERRUPT INDEX: EQU 004H ;INDEX INTERRUPT IMMED: EQU 008H ;IMMEDIATE INTERRUPT ; TYPE 1 COMMANDS ; ; READY: EQU 080H ;NOT READY FLAG PROTECT: EQU 040H ;WRITE PROTECT FLAG HEAD: EQU 020H ;HEAD LOADED FLAG SEEKER: EQU 010H ;SEEK ERROR FLAG CRCERR: EQU 008H ;CRC ERROR FLAG TR0: EQU 004H ;TRACK 0 FLAG INDEXF: EQU 002H ;INDEX PULSE FLAG BUSY: EQU 001H ;BUSY FLAG READYB: EQU 10000000B ;NOT READY FLAG 80H PROTECTB: EQU 01000000B ;WRITE PROTECT FLAG 40H BUSYB: EQU 00000001B ;BUSY FLAG 01H ; TYPE 2 BIS 4 COMMANDS ; ; RECTYP: EQU 020H ;RECORD TYPE FLAG RNF: EQU 010H ;RECORD NOT FOUND FLAG LOSTDA: EQU 004H ;LOST DATA FLAG DRQ: EQU 002H ;DATA REQUEST FLAG ; BIT-NR. IM STATUSREGISTER ; ; BREADY: EQU 7 ;NOT READY FLAG BPROTECT: EQU 6 ;WRITE PROTECT FLAG BHEAD: EQU 5 ;HEAD LOADED FLAG BSEEKER: EQU 4 ;SEEK ERROR FLAG BCRCERR: EQU 3 ;CRC ERROR FLAG BTR0: EQU 2 ;TRACK 0 FLAG BLOSTDA: EQU 2 ;LOST DATA FLAG BINDEXF: EQU 1 ;INDEX PULSE FLAG BBUSY: EQU 0 ;BUSY FLAG SYSFDC: EQU 68H ;ADR FLOPPY DISK CONTR0LLER ;-------------------------------------------------- SYSCMDR: EQU SYSFDC+0 ;ADR COMMANDREGISTER FDC SYSSTSR: EQU SYSFDC+0 ;ADR STATUSREGISTER FDC SYSTRKR: EQU SYSFDC+1 ;ADR TRACKREGISTER FDC SYSSECR: EQU SYSFDC+2 ;ADR SEKTORREGISTER FDC SYSDATR: EQU SYSFDC+3 ;ADR DATENREGISTER FDC PORT60: EQU 60H ; DMA BAUSTEIN PORT64: EQU 64H ; PORT66: EQU 66H ; ; PORTS SYSTEC PORT68: EQU 68H ; FDC MB8877A PORT69: EQU 69H PORT6A: EQU 6AH PORT6B: EQU 6BH PORT6C: EQU 6CH PORT6D: EQU 6DH PORT6E: EQU 6EH PORT6F: EQU 6FH PORT0C4: EQU 0C4H ; PORT0C6: EQU 0C6H ; PORT0CC: EQU 0CCH ; PORT0CD: EQU 0CDH ; PORT0D4: EQU 0D4H ; PORT0FC: EQU 0FCH PORT0FE: EQU 0FEH ;************ EPROM START ************************************************ ;************************************************************************* ;************************************************************************* org 0000h START1: D0000: di jr START2 ;D0011 ; (+0eh) rst 38h rst 38h D0005: nop sub b add hl,bc D0008: ret rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h D0010: ret TRTEST: EQU 0e9e1h+005ch START2: D0011: ld sp,BIOS ;le000 ld hl,0e9e1h ld (BIOS),hl D001A: call BIOS ;le000 springe nach 0e000h START3: D001D: TEST1: EQU 0079H+005CH ; 0D5H ld de,005ch D0020: add hl,de ; HL = 0079H DE = 005CH ld de,BIOS ;le000 ld bc,2000h ldir jp BIOS ;le000 springe nach 0e000h T002C: DEFM "SYSTEC CP/M 3 Mover/Loader (Ver. 2.0)" DEFB 0DH DEFB 0AH T0053: DEFM "*** (c) 1985 by SYSTEC (MnKr) ***" DEFB 0DH DEFB 0AH DEFB 00H DEFB "$" DEFB 1AH ; wird nach 0e000h kopiert ; START4: T0079: ld sp,BIOS ;le000 TEST4: EQU START4+2000H ld a,(0005h) ; and 03h ; push af ; ld a,70h ; 01110000B out (0feh),a ; 0FEH ld a,00h ; D0088: out (0fch),a ; 0FCH ld a,0d0h ; 11010000B out (0cch),a ; 0CCH out (0cdh),a ; 0CDH D0090: in a,(0d4h) ; 0D4H ld b,00h ; START5: D0094: call 0e02dH ; djnz D0094 ; (-05h) ld hl,0e02fh ; D009c: ld de,00a8h ; ld bc,2000h ; push de ; ldir ; ret ; D00A6: reti START6: ; T00A8: pop af ; ld ix,0d5fh ; ld (ix-0fh),a ; ;; ld sp,T0231 ; 0231h ;; call l0ab0 ; ;************************************************************************** ;************************************************************************** LD SP,StackBot ; 15.08.2008 HR ole CALL BootF ; 15.08.2008 HR ole first call is to Cold Boot RESETD: ;; ld c,0dh ; LD C,RESETSYS ; Initialize the System call BDAUS ; l023d PRINT0: ; ld c,09h ; ld de,T01D5 ;01d5h LD C,PRINTBUF ; Print the sign on message LD DE,SIGNON call BDAUS ;l023d OPEN1: D00c3: ; ld c,0fh ; ld de,LOADSYS ;015bh LD C,OPENZFUNC ; Open the CPM3.SYS file LD DE,CPMFCB call BDAUS ;l023d D00CB: cp 0ffh ; ld de,T017F ;017fh failed to open CPM3.SYS LD DE,OPENERR jp z,PRINT2 ;l0152 ld de,l0030 ; 48 DEZ call DMA1 ;l013f call READ1 ;l0145 ld hl,l0030 ld de,T0231 ;0231h ld c,06h D00e4: ld a,(hl) ld (de),a inc de inc hl dec c jp nz,D00e4 call READ1 ;l0145 PRINT1: ld c,09h ld de,l0030 call BDAUS ;l023d ld a,(T0232) ;0232h ld h,a ;; ld a,(0231h) ld a,(T0231) call D0123 ld a,(T0234) ;0234h or a jp z,D010f ld h,a ld a,(D0233) call D0123 D010f: ld hl,000dh ; ld a,(hl) ; cp 24h ; jp nz,D011f ; inc hl ; ld a,(hl) ; cp 42h ; call z,D0159 ; D011f: ld sp,D0235 ;0235h ret D0123: or a ld d,a ld e,00h ld a,h rla ld h,a D012a: ex de,hl ; ld bc,0ff80h ; add hl,bc ex de,hl push de push hl call DMA1 ;l013f call READ1 ;l0145 pop hl pop de dec h jp nz,D012a ; ret DMA1: D013f: ld c,1ah call BDAUS ;l023d ret READ1: D0145: ld c,14h ; ld de,LOADSYS ; 015bh call BDAUS ; l023d or a ; ld de,T01AA ; 01aah failed to read CPM3.SYS ret z ; PRINT2: D0152: ld c,09h ; call BDAUS ; l023d di ; halt ; D0159: rst 38h ; ret ; CPMFCB: LOADSYS: T015B: DEFB 0 ; T015C: DEFM "CPM3 SYS" ; D167: DEFS 24,0 ; OPENERR: T017F: DEFB 0DH ; DEFB 0AH ; T0181: DEFM "CPMLDR error: failed to open CPM3.SYS" T01A7: DEFB 0DH DEFB 0AH DEFB "$" T01AA: DEFB 0DH DEFB 0AH T01AC: DEFM "CPMLDR error: failed to read CPM3.SYS" DEFB 0DH DEFB 0AH DEFB "$" SIGNON: T01D5: DEFB 0DH T01D6: DEFB 0AH ; ld a,(bc) LOADERT: T01D7: DEFS 23,0AH D01ee: DEFM "CP/M V3.0 Loader" DEFB 0DH DEFB 0AH DEFM "Copyright (C) 1982, Digital Research" DEFB 0DH DEFB 0AH DEFB "$" D0277: DEFM "021182" DEFB 0,0 DEFB 0,0 ; nop ; nop ;************************************************************************** ;************************************************************************** ; 15.08.2008 HR ole ;************************************************************************** ;************************************************************************** StackBot: T0231: DEFB 0 T0232: DEFB 0 ;; DEFS 2,0 ; nop ; nop T0233: D0233: DEFB 0 T0234: DEFB 0 D0235: DEFB 0,0,0,0,0,0,0,0 ; ; Enter here from the user's program with function number in c, ; and information address in d,e ; BDAUS: D023d: ex de,hl ; ld (D098F),hl ; 098fh ex de,hl ; ld a,c ; cp 0eh ; D0245: jp c,D0255 ; ld (D0992),a ; 0992h xor a ; ld (D0967),a ; 0967h ld a,(D098E) ; 098eh ld (D096E),a ; 096eh D0255: ld a,e ld (D096A),a ; 096ah D0259: ld hl,l0000 ld (D03B9),hl ; 03b9h ld (D0991),hl ; 0991h add hl,sp ld (DATEN14),hl ; 02f0h ld sp,D0342 ld hl,D08FE ; 08feh push hl ld a,c cp 32h ; jp nc,D027a ld c,e ld hl,DATEN11 ; 028ch jp D027f D027a: sbc a,64h jp c,l074b START12: D027f: ld e,a ld d,00h add hl,de add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,(D098F) ; 098fh ex de,hl jp (hl) DATEN11: D028C: DEFB 98H DEFB 03H ;; sbc a,b ;; inc bc sbc a,b inc bc ld l,e inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc adc a,a inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc or b ex af,af' rst 00h ex af,af' D02AA: call 9808H inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc ex de,hl ex af,af' sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc pop af ex af,af' rst 30h ex af,af' sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc sbc a,b inc bc DATEN14: T02F0: DEFB 0 DEFB 0 ;; nop ;; nop RTTZ: DEFS 16,0C7H T0302: DEFB 0C7H FSDSDF: DEFS 33,0C7H T0324: DEFS 30,0C7H ; Compute character position/write console char fr ; Compcol = true if computing column position DATEN10: D0342: ld a,(039eh) or a jp nz,D034e push bc call l0abc START18: D034D: pop bc D034e: ld a,c ld hl,098ah cp RUBOUT ;7fh ret z inc (hl) cp 20h ret nc dec (hl) ld a,(hl) or a ret z ld a,c cp 08h jp nz,D0365 dec (hl) ret D0365: cp 0ah ret nz ld (hl),00h ret START15: D036b: ld a,c cp 09h jp nz,D0342 D0371: ld c,20h call D0342 ld a,(D098A) ; 098ah and 07h jp nz,D0371 ret START14: D037f: ld hl,D098B ; 098bh ld a,(bc) cp (hl) ret z inc bc push bc ld c,a call D036b pop bc jp D037f START13: D038F: ex de,hl ld c,l ld b,h jp D037f STAZRET: ; Store the A register to aret D0395: ld (03b9h),a ret SETLRET1: ; Set lret = 1 l0399: ld a,01h jp D0395 T039E: DEFB 0 ;************************************************************************** ;************************************************************************** ; ; Error Messages BDOSERR: D39F: DEFB 0DH DEFB 0AH T03A1: DEFM "BDOS ERR: $" SELECTERR: D03AC: DEFM "Select$" PERMERR: D03B3: DEFM "Perm.$" D03B9: DEFB 0 DEFB 0 D3BB: D03bb: ld bc,BDOSERR ;039fh ; BDOS ERR call D037f ld bc,SELECTERR ;03ach Select jp l03d0 D03c7: ld bc,BDOSERR ;039fh call D037f ld bc,PERMERR ;03b3h Perm l03d0: call D037f di halt l03d5: ld a,e sub l ld e,a ld a,d sbc a,h ld d,a ret nc dec b ret l03de: ld a,e add a,l ld e,a ld a,d adc a,h ld d,a ret nc inc b ret l03e7: inc c l03e8: dec c ret z add hl,hl adc a,a l03ec: jp l03e8 l03ef: ld a,(de) cp (hl) ret nz inc hl inc de dec c ret z jp l03ef l03f9: inc c l03fa: dec c ret z ld a,(de) ld (hl),a inc de inc hl jp l03fa l0403: ld c,d call l0acb ld a,h or l ret z ld e,(hl) inc hl ld d,(hl) inc hl inc hl inc hl ld (0940h),hl inc hl inc hl ld (0942h),hl inc hl inc hl inc hl inc hl inc hl inc hl ex de,hl ld (0968h),hl ld hl,0948h ld c,0dh call l03f9 ld hl,(0948h) ex de,hl ld hl,0955h ld c,11h call l03f9 ld hl,(095ah) ld a,h ld hl,096dh ld (hl),0ffh or a jp z,l0445 ld (hl),00h l0445: scf ret HOME: l0447: call l0ac8 xor a ld hl,(0940h) ld (hl),a inc hl ld (hl),a ld hl,(0942h) ld (hl),a inc hl ld (hl),a inc hl ld (hl),a ret l045a: ld hl,0973h ld e,(hl) inc hl ld d,(hl) inc hl ld b,(hl) ret l0463: call l045a call l0ad7 or a ret z ld c,a cp 03h jp c,D03c7 ld c,01h jp D03c7 l0476: ld hl,(0993h) ld c,02h call l05d6 ld b,00h ex de,hl ld hl,0973h ld (hl),e inc hl ld (hl),d inc hl ld (hl),b ret l048a: ld hl,(0940h) ld c,(hl) inc hl ld b,(hl) push bc ld hl,(0942h) ld e,(hl) inc hl ld d,(hl) inc hl ld b,(hl) ld hl,(0973h) ld a,(0975h) ld c,a l04a0: ld a,l sub e ld a,h sbc a,d ld a,c sbc a,b push hl jp nc,l04b7 ld hl,(0955h) call l03d5 pop hl ex (sp),hl dec hl ex (sp),hl jp l04a0 l04b7: ld hl,(0955h) call l03de pop hl ld a,l sub e ld a,h sbc a,d ld a,c sbc a,b jp c,l04ce ex (sp),hl inc hl ex (sp),hl push hl jp l04b7 l04ce: ex (sp),hl push hl ld hl,(0955h) call l03d5 pop hl push de push bc push hl ex de,hl ld hl,(0962h) add hl,de ld b,h ld c,l ld (097eh),hl call l0ace pop de ld hl,(0940h) ld (hl),e inc hl ld (hl),d pop bc pop de ld hl,(0942h) ld (hl),e inc hl ld (hl),d inc hl ld (hl),b pop bc ld a,c sub e ld l,a ld a,b sbc a,d ld h,a call l051b ld b,h ld c,l ld hl,(0968h) ex de,hl call l0ae0 ld c,l ld b,h ld (0980h),hl call l0ad1 ld hl,(093ah) ld c,l ld b,h jp l0ad4 l051b: ld a,(0964h) ld c,a jp l05d6 l0522: ld hl,0957h ld c,(hl) ld a,(0971h) l0529: or a rra dec c jp nz,l0529 ld b,a ld a,08h sub (hl) ld c,a ld a,(0970h) l0537: dec c jp z,l0540 or a rla jp l0537 l0540: add a,b ret l0542: ld hl,(098fh) ld de,l0010 add hl,de ret l054a: call l0542 add hl,bc ld a,(096dh) or a jp z,l0558 ld l,(hl) ld h,b ret l0558: add hl,bc ld a,(hl) inc hl ld h,(hl) ld l,a ret l055e: call l0522 ld (096bh),a ld c,a ld b,00h call l054a ld (0973h),hl ld a,l or h ret l0570: ld a,(0957h) ld c,a ld hl,(0973h) xor a call l03e7 ld (0973h),hl ld (0975h),a ld (0976h),hl ld a,(0958h) ld c,a ld a,(0971h) and c ld b,a ld (0966h),a ld hl,0973h or (hl) ld (hl),a ret l0596: ld hl,(098fh) ld de,000ch add hl,de ret l059e: ld hl,(098fh) ld de,000fh add hl,de ret l05a6: call l059e ex de,hl ld hl,l0011 add hl,de ret l05af: call l05a6 ld a,(hl) ld (0971h),a ex de,hl ld a,(hl) ld (096fh),a call l0596 ld a,(0959h) and (hl) ld (0970h),a ret l05c6: call l05a6 ld c,01h ld a,(0971h) add a,c ld (hl),a ex de,hl ld a,(096fh) ld (hl),a ret l05d6: inc c l05d7: dec c ret z ld a,h or a rra ld h,a ld a,l rra ld l,a jp l05d7 l05e3: inc c l05e4: dec c ret z add hl,hl jp l05e4 l05ea: ld a,(098eh) push bc ld c,a ld hl,0001h call l05e3 pop bc ld a,c or l ld l,a ld a,b or h ld h,a ret l05fd: ld a,(098eh) ld c,a call l05d6 ld a,l and 01h ret l0608: ld hl,(093ch) ld a,(0979h) add a,l ld l,a ret nc inc h ret l0613: call l0596 ld a,(hl) and 1fh ld (hl),a ret l061b: ld a,e sub l ld l,a ld a,d sbc a,h ld h,a ret l0622: push de ld de,000ah add hl,de ld e,(hl) inc hl ld d,(hl) ex de,hl pop de ret l062d: call l0476 ld a,(0965h) or a jp z,l063f ld a,03h call l0998 jp l064b l063f: call l0651 ld (093ch),hl call l048a call l0463 l064b: ld hl,(098ch) jp l0657 l0651: ld hl,(094eh) call l0622 l0657: ld (093ah),hl ret l065b: ld hl,0993h ld a,(hl) inc hl cp (hl) ret nz inc a ret l0664: ld hl,0ffffh ; ld (0993h),hl ; ret ; l066b: ld hl,(095ch) ex de,hl ld hl,(0993h) inc hl ld (0993h),hl call l061b jp c,l0664 ld a,(0993h) and 03h ld b,05h l0683: add a,a dec b jp nz,l0683 ld (0979h),a or a ret nz push bc call l062d pop bc ret l0693: push bc push af ld a,(0959h) ; 0959h cpl ld b,a ld a,c and b ld c,a pop af and b sub c and 1fh pop bc ret l06a4: call l05a6 ld c,10h ld b,c inc c push bc l06ac: pop bc dec c xor a l06af: dec hl dec b cp (hl) jp nz,l06b9 dec c jp nz,l06af l06b9: ld a,c ld (096bh),a ; 096bh ld a,(096dh) ; 096dh or a ld a,b jp nz,l06c6 rra l06c6: push bc push hl ld l,a ld h,00h ld a,(0957h) ; 0957h ld d,a ld a,07h ; sub d ld c,a call l05d6 ld b,l ld a,(0959h) ; 0959h cp b pop hl jp c,l06ac call l0596 ld c,(hl) cpl and 1fh and c or b pop bc ret l06ea: ld hl,(D098F) ; 098fh ld (D0995),hl ; 0995h ld a,c ; ld (D0997),a ; 0997h call l0664 ; call l0447 ; l06fa: ld c,00h ; call l066b ; call l065b ; jp z,l074b ; ld hl,(D0995) ; 0995h ex de,hl ; call l0608 ; ld a,(D0997) ; 0997h ld c,a ; ld b,00h ; ld a,(hl) ; cp 0e5h ; jp z,l06fa ; l0718: ld a,c ; or a ; jp z,l0744 ; ld a,b ; cp 0dh ; jp z,l073d ; cp 0ch ; jp z,l0732 ; ld a,(de) ; sub (hl) ; and 7fh ; jp nz,l06fa ; jp l073d ; l0732: ld a,(de) push bc ld c,(hl) call l0693 pop bc or a jp nz,l06fa l073d: inc de inc hl inc b dec c jp l0718 l0744: xor a ; ld (D03B9),a ; 03b9h ld b,a ; inc b ; ret ; l074b: ld a,0ffh ; ld b,a ; inc b ; jp D0395 ; l0752: ld c,0fh call l06ea ret z l0758: call l0596 ld a,(hl) push af call l0608 ex de,hl ld hl,(D098F) ; 098fh ld c,20h ; call l03f9 call l06a4 ld c,a pop af ld (hl),a l076f: ld b,00h ex de,hl ld hl,0003h add hl,de ld a,(de) sub c jp z,l0788 ld a,b jp nc,l0782 ld a,80h ; ld b,(hl) l0782: ld (hl),a ld a,b ld (D096C),a ; 096ch ret l0788: ld (D096C),a ; 096ch ld a,(hl) or a ret nz ld a,(D096B) ; 096bh or a ret z ld a,(D0992) ; 0992h cp 0fh ; ret z ld (hl),80h ret l079c: push hl ld a,(D096C) ; 096ch or a jp z,l07ad ld de,0003h add hl,de ld (hl),a xor a ld (D096C),a ; 096ch l07ad: pop hl ret l07af: call l0596 ld a,(hl) ld c,a inc c call l0693 jp z,l07d1 ld a,1fh and c ld (hl),a ld c,0fh call l06ea call l0758 l07c7: call l05af xor a ld (D0971),a ; 0971h jp D0395 l07d1: inc (hl) call l06a4 ld c,a cp (hl) jp nc,l07de dec (hl) jp l0399 l07de: call l079c call l076f jp l07c7 l07e7: call l05af ld a,(D0971) ; 0971h ld hl,D096F ; 096fh cp (hl) jp c,l0803 cp 80h ; jp nz,l0399 call l07af ld a,(03b9h) ; 03b9h or a jp nz,l0399 l0803: call l055e jp z,l0399 call l0570 ld a,(D0965) ; 0965h or a jp nz,l0982 call l064b call l048a call l0463 jp l05c6 l081f: ld a,(D098E) ; 098eh inc a jp z,D03bb dec a ld hl,D0972 ; 0972h cp (hl) ret z ld (hl),a ld d,a ld hl,(D0938) ; 0938h call l05fd ld e,a push de call l0403 pop hl jp nc,D03bb dec l ret z ld hl,(D0938) ; 0938h ld c,l ld b,h call l05ea ld (D0938),hl ; 0938h ret l084b: ld a,(D096A) ; 096ah ld (D098E),a ; 098eh ret l0852: xor a ld (D0978),a ; 0978h jp l0882 l0859: ld a,80h ; 128 DEZ ld b,a dec a ld c,a ld hl,(D098F) ; 098fh ld de,0007h ; ex de,hl add hl,de ld a,(hl) and b ld a,(hl) and c ld (hl),a inc hl ld a,(hl) and b ld (D0978),a ; 0978h ld a,(hl) and c ld (hl),a call l0613 call l059e ld a,(hl) and b jp z,l0882 ld a,(hl) and c ld (hl),b l0882: ld (D096C),a ; 096ch ld hl,l0000 ld (D097A),hl ; 097ah ld a,0ffh ; ld (D0991),a ; 0991h ld hl,(D098F) ; 098fh ld a,(hl) and 1fh dec a ld (D096A),a ; 096ah cp 0ffh jp z,l08a6 ld a,(hl) ld (D097A),a ; 097ah call l084b l08a6: call l081f ld a,00h ld hl,(D098F) ; 098fh ld (hl),a ret ld hl,l0000 ; ld (D0938),hl ; 0938h xor a ; ld (D098E),a ; 098eh dec a ; ld (D0972),a ; 0972h ld hl,l0080 ; 128 DEZ ld (D098C),hl ; 098ch jp l064b D087C: call l084b jp l081f call l0852 call l0752 call l08d7 ret l08d7: call l065b ret z call l05a6 ld a,(hl) inc a jp nz,l08e7 dec de dec de ld a,(de) ld (hl),a l08e7: pop hl ld c,40h ret call l0859 jp l07e7 ld a,(D098E) ; 098eh jp D0395 D08F7: ex de,hl ld (D098C),hl ; 098ch jp l064b D08FE: ld a,(D0992) ; 0992h cp 0fh jp c,l092e ld a,(096eh) ld (D098E),a ; 098eh ld a,(D0991) ; 0991h or a jp z,l092e ld hl,(D098F) ; 098fh ld (hl),00h ld a,(D097A) ; 097ah or a jp z,l0920 ld (hl),a l0920: inc hl ld a,(D0978) ; 0978h or (hl) ld (hl),a call l059e ld a,(D096C) ; 096ch or (hl) ld (hl),a l092e: ld hl,(DATEN14) ; 02f0h ld sp,hl ld hl,(D03B9) ; 03b9h ld a,l ld b,h ret D0938: T0938: DEFB 0 DEFB 0 D093A: DEFB 0 DEFB 0 DEFB 0 DEFS 11H,0 D094E: DEFB 0 DEFB 0 D0950: DEFS 5,0 D0955: DEFS 16,0 D0965: DEFB 0 DEFB 0 D0967: DEFS 3,0 D096A: DEFB 0 D096B: DEFB 0 D096C: DEFB 0,0 D096E: DEFB 0 D096F: DEFS 2,0 D0971: DEFB 0 D0972: T0972: DEFB 0FFH ;rst 38h D0973: DEFS 5,0 D0978: DEFB 0 D0979: DEFB 0 D097A: DEFB 0 D097B: DEFB 0 D097C: DEFB 0 DEFS 5,0 l0982: ld a,01h call l099e jp l05c6 D098A: T098A: DEFB 0 D098B: DEFB 24H D098C: DEFB 80H D098D: DEFB 0 D098E: DEFB 0 D098F: DEFB 0 D0990: DEFB 0 D0991: DEFB 0 D0992: DEFB 0,0,0 D0995: DEFB 0 D0996: DEFB 0 D0997: DEFB 0 l0998: ld hl,(094eh) ; jp l09a1 ; l099e: ld hl,(0950h) ; D950 l09a1: push af call l0a04 ld a,(0973h) ; ld e,a ; and b ; ld (097bh),a ; ld a,e ; and c ; ld (0973h),a ; ld (097ch),hl ; call l0622 ; ld (093ah),hl ; call l0a0b ; pop af ; push af ; cp 04h ; jp nc,l09cc ; call l03ef ; jp z,l09dc ; xor a ; l09cc: call l0a14 ; ld a,02h ; call l0a1c ; call l0a0b ; call l03f9 ; ld (hl),00h ; l09dc: ld a,(097bh) ; inc a ; ld de,l0080 ; ld hl,0ff80h ; l09e6: add hl,de ; dec a ; jp nz,l09e6 ; ex de,hl ; ld hl,(093ah) ; add hl,de ; pop af ; cp 03h ; jp nz,l09fa ; ld (093ch),hl ; ret l09fa: ex de,hl ; ld hl,(098ch) ; ld bc,l0080 ; jp l0afb ; l0a04: ld a,(0965h) ; ld b,a ; cpl ; ld c,a ; ret ; l0a0b: ld hl,(097ch) ld de,0972h ld c,04h ret l0a14: ld de,0004h ld hl,(097ch) add hl,de ret l0a1c: push af call l048a pop af dec a call p,l0463 call l0a14 inc hl inc hl ld de,097eh ld c,04h jp l03f9 D0A32: DEFS 126,0 START7: BootF: l0ab0: jp l0b13 jp l0be3 l0ab6: jp CONST ;l0e69 l0ab9: jp CONIN ;l0e5f START16: l0abc: jp CONOUT ;l0e45 jp CONOUT ;l0e45 jp CONOUT ;l0e45 jp CONIN ;l0e5f l0ac8: jp l0c71 l0acb: jp l0c37 l0ace: jp l0c74 l0ad1: jp l0c79 l0ad4: jp l0c7e l0ad7: jp l0c8f jp l0cb6 jp l0e6e l0ae0: jp l0c84 jp l0e6e jp CONST ;l0e69 jp l0e6e jp l0be3 jp l0e4f jp l0be4 jp l0cb2 jp l0cb6 l0afb: jp l0dbc jp l0dd4 jp l0c36 jp l0c83 jp l0dc0 jp l0000 jp l0000 jp l0000 START8: l0b13: ld (D0CD8),sp ; 0cd8h ld sp,00b0h ; call l0e4f ; START10: D0B1D: call l0e2a ; D0D4F: EQU 0D4FH ld hl,D0D4F ; 0d4fh ld b,10h ; ld a,0ffh ; ld (D0DCC),a ; 0dcch l0b2a: ld d,(hl) dec hl ld e,(hl) dec hl push hl push bc ld a,e or d call nz,l0bcd pop bc pop hl djnz l0b2a ; (-0fh) l0b39: ld hl,0d4fh ld b,10h l0b3e: ld d,(hl) dec hl ld e,(hl) dec hl push hl push bc ld a,e or d jr z,l0b7f ; (+37h) ld c,b dec c ld e,00h call l0acb ld a,h or l jr z,l0b7f ; (+2ch) pop bc push bc ld a,b ld de,LOADSYS ; 015bh ld (de),a push de ld a,(de) add a,40h D0BA1: EQU 0BA1H ld (D0BA1),a ; 0ba1h ABOOTEN: ld de,BOOTING ; T0B98 ; 0b98h ld c,09h call BDAUS ; l023d pop de D0B6A: OPEN2: ld c,0fh call BDAUS ; l023d and a jr nz,l0b7f ; (+0dh) xor a ld (D0DCC),a ; 0dcch pop af ;; ld (015bh),a ld (LOADSYS),a ld sp,(D0CD8) ; 0cd8h ret l0b7f: pop bc pop hl djnz l0b3e ; (-45h) ld de,BOOTERR ;0bach ld c,09h call BDAUS ;l023d call l0ab9 ld de,T0BCA ;0bcah ld c,09h call BDAUS ;l023d jr l0b39 ; (-5fh) BOOTING: T0B98: DEFB 0DH T0B99: DEFM "Booting @:CPM3.SYS$" BOOTERR: T0BAC: DEFM " - Boot Error, to retry:$" T0BCA: DEFB 0DH DEFB 0AH DEFB "$" l0bcd: push de pop ix ld a,(ix-02h) ld (D0CDB),a ; 0cdbh ld a,b dec a ld (D0CDA),a ; 0cdah l0bdb: ld d,(ix-03h) ld e,(ix-04h) ex de,hl l0be2: jp (hl) l0be3: ret l0be4: ld hl,0d30h ret push bc push de l0bea: ld a,(hl) or a jr z,l0bf7 ; (+09h) ld c,a push hl call l0abc pop hl inc hl jr l0bea ; (-0dh) l0bf7: pop de l0bf8: pop bc ret l0bfa: ld b,00h ld de,2710h D0BFF: call l0c18 D0C02: ld de,l03e8 call l0c18 D0C08: ld de,0064h call l0c18 ld de,000ah call l0c18 inc b ld de,0001h l0c18: ld c,0ffh or a l0c1b: inc c sbc hl,de jr nc,l0c1b ; (-05h) add hl,de ld a,c or a jr nz,l0c28 ; (+03h) inc b dec b ret z l0c28: add a,30h ld c,a push bc push de push hl call l0abc pop hl pop de pop bc inc b ret l0c36: ret l0c37: ld a,c and 0fh ld (D0CDA),a ; 0cdah ld l,a l0c3e: ld h,00h add hl,hl ld bc,D0D30 ; 0d30h add hl,bc ld a,(hl) inc hl ld h,(hl) ld l,a or h ret z ld a,e and 01h ld a,00h jr nz,l0c6b ; (+19h) push hl push ix ex de,hl push de pop ix ld a,(ix-02h) ld (D0CDB),a ; 0cdbh ld l,(ix-06h) ld h,(ix-05h) call l0be2 pop ix pop hl l0c6b: and a ret z ld hl,l0000 ret l0c71: ld bc,l0000 l0c74: ld (0cdch),bc ret l0c79: ld (0cdeh),bc ret l0c7e: ld (0ce0h),bc ret l0c83: ret l0c84: ld l,c ld h,b ld a,d or e ret z ex de,hl add hl,bc ld l,(hl) ld h,00h ret l0c8f: ld hl,(D0CDA) ; 0cdah ld h,00h add hl,hl ld bc,D0D30 ; 0d30h add hl,bc ld a,(hl) inc hl ld h,(hl) ld l,a or h ld a,0fdh ret z ex de,hl push de pop ix ld l,(ix-08h) ld h,(ix-07h) ld a,(ix-02h) ld (D0CDB),a ; 0cdbh jp (hl) l0cb2: ld (D0CE2),a ; 0ce2h ret l0cb6: xor a ret l0cb8: ex (sp),ix push bc push de push hl D0cbd: ld c,(ix+00h) res 7,c push ix call l0abc pop ix bit 7,(ix+00h) inc ix jr z,D0cbd ; (-14h) pop hl pop de pop bc ex (sp),ix ret D0CD7: DEFB 0 D0CD8: DEFB 0 DEFB 0 D0CDA: DEFB 0 D0CDB: DEFB 0 D0CDC: DEFS 6,0 D0CE2: DEFB 0 D0CE3: DEFB 0 ; DMA D0CE4: DEFB 0 T0CE5: DEFM "01-Feb-85" DEFB 0 D0CEF: TESTT5567: EQU D0CEF+14 DEFB 01H ; 1 DEFB 14H ; 2 DEFB 28H ; 3 DEFB 80H ; 4 DEFB 85H ; 5 DEFB 6BH ; 6 DEFB 8AH ; 7 DEFB 0CFH ; 8 ; CF = Load D0CF7: DEFB 79H ; 9 l0cf8: DEFB 0 ; 10 DEFB 0 ; 11 DEFB 0 ; 12 DEFB 0 ; 13 D0CFC: DEFB 0CFH ; 14; CF = Load D0CFD: DEFB 0 DEFB 0 DEFB 0 D0D00: DEFB 0 D0D01: DEFB 0 D0D02: DEFB 0 D0D03: DEFB 0 D0D04: DEFB 0 T0D05: D0D05: DEFB 0 D0D06: DEFB 0 D0D07: DEFB 0 T0D08: D0D08: DEFB 1CH ;; inc e dec c ld h,e jr z,l0d0d ; (+00h) l0d0d: inc b rrca nop add a,b ld bc,007fh ret nz nop nop add a,b l0d18: ld b,00h ld (bc),a inc bc nop nop ld (hl),e jr z,l0d21 ; (+00h) l0d21: inc b rrca l0d23: nop adc a,a ld bc,00ffh ret p nop nop add a,b nop nop inc bc rlca D0D30: ld e,a dec c D32: DEFS 35,0 adc a,c dec c jp po,5a0fH djnz l0cf8 ; (-64h) rrca ld sp,l0000 D60: DEFS 10,0 rst 38h ld a,b dec c nop nop nop jr nz,l0cf8 ; (-7ah) rrca add a,(hl) rrca rst 38h rst 38h nop ld c,b nop inc b rrca nop adc a,a ld bc,00ffh ret p nop nop add a,b nop nop inc bc rlca ret PORT60A: T0D8A: D0d8a: push af ; ld a,87h ; 10000111B; 87 = Enable DMA out (DMAPORT),a ; PORT 60H ld a,(D0CE3) ; 0ce3h out (64h),a ; PORT 64H out (66h),a ; PORT 66H pop af ; D0d97: out (SYSCMDR),a ; PORT 68H push bc ; ld bc,0c00h ; TEST445: EQU 14H ; 14H 20 DEZ TEST446: EQU 80H ; 80H 128 DEZ ld a,14h ; FREAD: l0d9f: dec a ; jr nz,l0d9f ; (-03h) dec bc ; ld a,b ; or c ; ld a,80h ; jr z,l0db4 ; (+0bh) in a,(SYSSTSR) ; 68H Status-Register bit 0,a ; is the controller busy? ld a,80h ; jr nz,l0d9f ; (-12h) in a,(SYSSTSR) ; PORT 68H Status-Register and a ; l0db4: pop bc ; push af ; ld a,83h ; 10000011B ; 83 = Disable DMA out (DMAPORT),a ; PORT 60H DMA pop af ; ret ; DBC: ; l0dbc: ex de,hl ; ldir ; ex de,hl ; l0dc0: ret ; rst 38h ; rst 38h ; D0DC3: DEFS 9,0 ; D0DCC: DEFS 8,0 ; l0dd4: nop ; nop ; xor a ; ret ; TEXTB: DEFB 0DH ; DEFB 0AH ; T0DDA: DEFM "SYSTEC Loader 1.42" ; DEFB 0DH ; DEFB 0AH ; DEFB "$" ; T0DEF: DEFB 0DH ; DEFB 0AH ; T0DF1: DEFM "CP/M Plus System-Loader (c) SYSTEC GmbH Muenster-Roxel" DEFB 0DH ; DEFB 0AH ; DEFB "$" ; START11: l0e2a: ld de,T0DEF ;0defh ld c,09h ; call BDAUS ;l023d l0e32: ld hl,TEXTB ; 0dd8h ld de,LOADERT ;T01D7 ; 01d7h ld bc,0016h ; ldir ; xor a ; ld (0ce3h),a ; ld (0ce4h),a ; ret ; START17: CONOUT: l0e45: in a,(ACON) ; PORT 0C6H l0e47: bit 2,a ; jr z,CONOUT ; l0e45 ; (-06h) ld a,c ; out (ADATA),a ; PORT 0C4H ret ; START9: l0e4f: ld hl,T0E71 ; 0e71h ; ld c,ACON ; PORT 0C6H ld b,(hl) ; inc hl ; D0E56: otir ; ld c,0c8h ; PORT 0C8H ld b,(hl) ; inc hl ; l0e5c: otir ; ret ; CONIN: l0e5f: call CONST ; l0e69 jr z,CONIN ; l0e5f ; (-05h) D0E64: in a,(ADATA) ; PORT 0C4H res 7,a ; ret CONST: l0e69: in a,(ACON) ; PORT 0C6H rra ; sbc a,a ; ret ; l0e6e: or 0ffh ; ret ; T0E71: ;06.12.2007 01:02:00 0E56H: OTIR Data 18H sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data 04H sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data 4CH sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data 03H sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data E1H sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data 05H sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data EAH sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data 01H sent to port C6H ;06.12.2007 01:02:00 0E56H: OTIR Data E0H sent to port C6H BIN03H: EQU 00000011b ; BIN04H: EQU 00000100b ; BIN05H: EQU 00000101b ; BIN10H: EQU 00010000b ; BIN18H: EQU 00011000b ; BIN45H: EQU 01000101b ; BIN4CH: EQU 01001100b ; BINE0H: EQU 11100000b ; BINE1H: EQU 11100001b ; -CTS UND -DCD ENABLE BINEAH: EQU 11101010b ; dtr rts +12V bedeutet ready ; FUER PORT 0C6H ; ; DEFB 09H ; DEFB 18H ; RESET DEFB 04H ; DEFB 4CH ; 01001100b DEFB 03H DEFB 0E1H ; 11100001b DEFB 05H DEFB 0EAH ; 11101010b DEFB 05H DEFB 0EAH ; 11101010b DEFB 01H DEFB 0E0H ;06.12.2007 01:02:00 0E5CH: OTIR Data 03H sent to port C8H ;06.12.2007 01:02:00 0E5CH: OTIR Data 45H sent to port C8H ;06.12.2007 01:02:00 0E5CH: OTIR Data 10H sent to port C8H T0E7D: ; ld b,l ; ; djnz 0e63H ; (-1dh) ; FUER PORT C8H ; ; DEFB 03H ; 00000011b DEFB 45H ; 01000101b DEFB 10H ; 00010000b ld a,(hl) ; inc hl ; ex (sp),hl ; ld (0cd7h),a ; push iy ; push ix ; push bc ; push de ; push hl ; call l0ea4 ; push af ; ld a,c ; ld (0e98h),a ; call l0cb8 ; ld l,0dh ; adc a,d ; pop af ; pop hl ; pop de ; pop bc ; pop ix ; pop iy ; ret ; l0ea4: ld a,(0cd7h) or a jr z,l0eb9 ; (+0fh) dec a jr z,l0ec3 ; (+16h) dec a jr z,l0ec3 ; (+13h) dec a jr z,l0ecf ; (+1ch) ld a,(0f1eh) jp l0f5e l0eb9: call l0cb8 dec c ld c,h T0EBE: ld h,l ld (hl),e push hl jr l0ecf ; (+0ch) l0ec3: call l0cb8 dec c ld b,d ld h,l ld (hl),d ld h,l ld l,c call p,0018H l0ecf: ld a,(0cdah) add a,41h ld (0eech),a call l0cb8 T0EDA: DEFM "-Fehler, Laufwerk X" cp d ld a,(0cd7h) cp 02h jr z,l0f19 ; (+24h) call l0cb8 T0EF8: inc l DEFM " Spur" and b ld hl,(0cdch) call l0bfa call l0cb8 inc l DEFM " Sektor" and b ld hl,(0cdeh) push hl call l0bfa pop hl l0f19: call l0cb8 T0F1C: JR NZ,0F46H ;28H ;; DEFB 20H ;; DEFB 28H ;; DEFM " (" D0F1E: DEFM "Neuversuch" D0F28: xor a ld a,(0cd7h) cp 02h jr z,l0f3e ; (+0eh) l0f30: call l0cb8 D0F33: DEFM "Ignorieren" XOR A ;; DEFB 0AFH l0f3e: call l0cb8 D0F41: DEFM "Abbrechen" D0F4A: ADD HL,HL ;; DEFM ")" D0F4B: cp d l0f4c: call l0ab6 or a jr z,l0f57 ; (+05h) call l0ab9 jr l0f4c ; (-0bh) l0f57: call l0cb8 add a,a call l0ab9 l0f5e: cp 61h jr c,l0f64 ; (+02h) sub 20h l0f64: ld c,a ld a,(0f1eh) sub c ret z ld a,(0f41h) dec a sub c cp 0ffh scf ret z ld a,(0cd7h) cp 02h jr z,l0f82 ; (+08h) ld a,(0f33h) inc a sub c cp 01h ret z l0f82: ld c,4eh xor a ret rst 38h D0F87: nop nop nop nop nop nop nop nop nop T0F90: DEFB 65H D0F91: DEFB 20H D0F92: DEFB 00H ;; ld h,l ;; jr nz,T0F93 ; l0f93 ; (+00h) T0F93: l0f93: ld bc,T0302 ; 0302h inc b dec b ld b,07h ex af,af' add hl,bc TESTFDC: EQU 68H+3H D0F9C: di ; ALLE INTERRUPT SPERREN ; ld a,03h ; out (6eh),a ; PORT 6EH out (6fh),a ; PORT 6FH ld a,20h ; out (6ch),a ; PORT 6CH ld a,0cfh ; out (6eh),a ; PORT 6EH ld a,00h ; out (6eh),a ; PORT 6EH ld a,30h ; out (6dh),a ; PORT 6DH ld a,0cfh ; out (6fh),a ; PORT 6FH ld a,4bh ; out (6fh),a ; PORT 6FH TESTP: EQU 10H ; 16 dez ld hl,D0FD2 ; 0fd2h DMA ld b,10h ; 16 X ld c,DMAPORT ; PORT 60H DMA otir ; ld a,32h ; out (6dh),a ; PORT 6DH l0fc8: inc a ; jr nz,l0fc8 ; (-03h) ld a,30h ; out (6dh),a ; PORT 6DH xor a ; ei ; ALLE INTERRUPT FREIGEBEN ret ; DMAINIT: T0FD2: D0FD2: DEFB 083H ; 1 ; 83 = Disable DMA DEFB 0C3H ; 2 ; C3 = Reset DEFB 0C3H ; 3 DEFB 0C3H ; 4 DEFB 0C3H ; 5 DEFB 0C3H ; 6 DEFB 0C3H ; 7 DEFB 0AFH ; 8 ; AF = Disable Interrupts DEFB 001H ; 9 DEFB 014H ; 10 DEFB 028H ; 11 DEFB 080H ; 12 DEFB 085H ; 13 DEFB 06BH ; 14 DEFB 08AH ; 15 DEFB 0CFH ; 16 ; CF = Load D0FE2: call l1155 ret c ld (D0D03),a ; 0d03h call l1244 res 7,(ix-01h) call l1177 ret c l0ff4: ld b,04h l0ff6: call l127f ld a,(D0D05) ; 0d05h add a,a add a,a add a,a or 82h call T0D8A ;l0d8a and 9ch jr z,l101e ; (+16h) bit 4,a ld a,0ffh ret nz djnz l0ff6 ; (-19h) call 0e7fH nop jr c,l101b ; (+06h) and a jr z,l0ff4 ; (-24h) dec a jr z,l101e ; (+03h) l101b: ld a,01h ret l101e: call l1026 ret c ld b,04h jr l0ff6 ; (-30h) l1026: ld a,(D0D03) ; 0d03h dec a ld (D0D03),a ; 0d03h scf ret z ld hl,(0ce0h) ld e,(ix-0ch) ld d,(ix-0bh) add hl,de ld (0ce0h),hl ld a,(0cdeh) inc a ld (0cdeh),a cp (ix-0dh) jp c,l11b6 ld a,(0cdch) inc a ld (0cdch),a xor a ld (0cdeh),a call l119d ret c xor a ret ld a,(ix-02h) out (6ch),a ; 6CH rlca rlca and 42h xor 02h ld (ix-01h),a call l10f7 ret c call l129e ld a,0ch call D0d97 call l10f7 ret c call l129e jr nc,l1097 ; (+1ah) ld a,(ix-01h) xor 02h ld (ix-01h),a ld a,(ix-02h) xor 80h res 6,a ld (ix-02h),a call l10f7 ret c call l129e ret c FTEST: EQU 6dH-3H l1097: in a,(6dh) ; 6DH and 01h ; 00000001B ld l,a ld a,(D0D00) ; 0d00h add a,a add a,a add a,a add a,a or l or (ix-01h) ld (ix-01h),a ld c,a ld de,D0F92 ; 0f92h cp 63h jr z,l10b5 ; (+03h) ld de,l0000 l10b5: ld (ix+00h),e ld (ix+01h),d ld de,D0D08 ; 0d08h l10be: ex de,hl ld a,h or l ld a,01h ret z ld e,(hl) inc hl ld d,(hl) inc hl ld a,(hl) inc hl cp c jr nz,l10be ; (-0fh) ld (ix+0ch),l ld (ix+0dh),h ld c,(hl) inc hl ld b,(hl) dec hl ex de,hl ld hl,000fh add hl,de ld a,(hl) ld hl,l0080 and a jr z,l10eb ; (+08h) l10e3: add hl,hl srl b rr c dec a jr nz,l10e3 ; (-08h) l10eb: ld (ix-0ch),l ld (ix-0bh),h ld (ix-0dh),c ex de,hl xor a ret l10f7: ld a,(ix-02h) out (6ch),a ; 6CH and a ; bit 5,a ; jr z,l1124 ; (+23h) ld a,20h ; out (6ch),a ; 6CH ld a,(ix-02h) ; out (6ch),a ; 6CH in a,(SYSSTSR) ; 68H push bc ; ld bc,0800h ; l1110: dec bc ; ld a,b ; or c ; scf ; jr z,l1120 ; (+0ah) xor a ; l1117: dec a ; jr nz,l1117 ; (-03h) in a,(SYSSTSR) ; 68H bit 7,a ; jr nz,l1110 ; (-10h) l1120: pop bc ; ret nc ; jr l1138 ; (+14h) l1124: ld a,(ix-02h) ; and a ; out (6ch),a ; 6CH ld b,80h ; l112c: in a,(SYSSTSR) ; 68H FDC STATUS bit 7,a ; jp z,l1148 ; call l1148 ; djnz l112c ; (-0ch) l1138: call 0e7fH ; ld (bc),a ; jr c,l1145 ; (+07h) and a ; jr z,l10f7 ; (-4ah) scf ; ld a,0ffh ; ret ; l1145: ld a,01h ; ret ; l1148: push bc ; ld b,14h ; l114b: push bc ; ld b,00h ; l114e: djnz l114e ; (-02h) pop bc ; djnz l114b ; (-08h) pop bc ; ret ; l1155: ex de,hl ld a,(hl) inc hl or (hl) dec hl ex de,hl ld hl,0ce2h jr z,l1162 ; (+02h) ld (hl),00h l1162: ld a,(hl) and a ld a,01h ret z ld a,(hl) dec (hl) bit 7,(hl) set 7,(hl) ret z xor a res 7,(hl) cp (hl) scf ret z set 7,(hl) ret BIN0FH: EQU 00001111B ; 0FH 15 dez l1177: in a,(6ch) ; 6CH xor (ix-02h) and 0fh ; 00001111B ld (D0D07),a ; 0d07h call l10f7 ret c in a,(6dh) ; 6DH xor (ix-01h) and 01h ; 00000001B jr nz,l11be ; (+30h) ld a,(D0D07) ; 0d07h and a ; call nz,l129e ; ret c ; call FRESET ;l1272 call nz,l129e ret c l119d: xor a ld (D0D05),a ; 0d05h ld hl,D0D06 ; 0d06h ld a,(0cdch) ; ld (hl),a call l11c2 ret c ld a,(D0D05) ; 0d05h rrca rrca or (ix-02h) out (6ch),a ; 6CH l11b6: ld a,(0cdeh) inc a out (SYSSECR),a ; PORT 6AH and a ret l11be: scf ld a,0ffh ret l11c2: call D122f ld b,05h l11c7: ld hl,D0D06 ; 0d06h ld a,(ix-0eh) out (SYSTRKR),a ; PORT 69H cp (hl) ; ret z ; ld a,(hl) ; out (SYSDATR),a ; 6BH ld a,(ix-02h) ; res 4,a ; out (6ch),a ; 6CH ld a,18h ; or (ix-0fh) ; call D0d97 ; and 80h ; ld a,(ix-02h) ; out (6ch),a ; 6CH ld a,01h ; scf ; ret nz ; l11ee: ld a,79h ; ld hl,0cfdh ; call l128c ; ld a,0c4h ; call T0D8A ;l0d8a and 9ch ; jr z,l1206 ; (+07h) djnz l11ee ; (-13h) scf ; ld a,0ffh ; jr l1211 ; (+0bh) l1206: ld a,(0cfdh) ; ld (ix-0eh),a ; djnz l11c7 ; (-47h) ld a,01h ; scf ; l1211: push af ; call l0cb8 ; rlca ; T1216: DEFM "SeekErro" DEFB 0F2H DEFB 3EH DEFB 0CH D1221: or (ix-0fh) call D0d97 xor a out (SYSTRKR),a ; PORT 69H ld (ix-0eh),a pop af ret D122f: bit 4,(ix-02h) jr z,D1237 ; (+02h) jr D123c ; (+05h) D1237: in a,(6dh) ; 6DH and 01h ret nz D123c: xor a srl (hl) rla ld (D0D05),a ; 0d05h ret l1244: ex (sp),ix ld (2665h),sp ld sp,2665h call l126c cp 0ffh jr nz,l125a ; (+06h) ld (ix+0bh),a ld (0dceh),a l125a: and a jr z,l1265 ; (+08h) ld ix,0ce2h ld (ix+00h),00h l1265: ld sp,(2665h) pop ix ret l126c: push ix push de pop ix ret BIN20H: EQU 00100000B FRESET: l1272: ld a,FORCED ; 0d0h ; 11010000B out (SYSCMDR),a ; 68H nop nop out (SYSCMDR),a ; 68H in a,(SYSSTSR) ; 68H and 20h ; 00100000B ret TEST556: EQU 0eh ; 14 dez l127f: ld hl,(0ce0h) ; bit 7,(ix-01h) ; ld a,79h ; jr z,l128c ; (+02h) ld a,7dh ; l128c: ld (0cf7h),a ; ld (l0cf8),hl ; ld hl,D0CEF ; 0cefh ; push bc ; ld b,0eh ; 14 dez ld c,DMAPORT ; Port 60h DMA otir ; pop bc ; ret ; l129e: ld a,79h ; ld hl,0cfdh ; call l128c ; call FRESET ;l1272 ; ld a,RACMD ; 0c0h ; jr nz,l12af ; (+02h) or 04h ; l12af: call T0D8A ;l0d8a and 9ch ; scf ; ld a,0ffh ; ret nz ; ld a,(0cfdh) ; out (SYSTRKR),a ; PORT 69H ld (ix-0eh),a ; in a,(6dh) ; 6DH and 01h ; 00000001H ld l,a ; ld a,(D0D00) ; 0d00h add a,a ; add a,a ; add a,a ; add a,a ; or l ; xor (ix-01h) ; and 7dh ; ret z ; ld a,0ffh ; ret ; TEST53: EQU $ TEST54: EQU 1300H-TEST53 ;1300H HEX1A: DEFS TEST54,1AH TEST55: EQU $ TEST56: EQU 2000H-TEST55 ;1300H EPROM1: DEFS TEST56,0FFH TEND: ; 2000H END