Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
builderpages:plasmo:zzrcc:cpldrom [2020/12/16 08:14] plasmo |
builderpages:plasmo:zzrcc:cpldrom [2020/12/18 08:43] (current) plasmo |
||
---|---|---|---|
Line 6: | Line 6: | ||
< | < | ||
- | ;12/5/20 | + | ;12/18/20 |
;32-byte ROM inside CPLD | ;32-byte ROM inside CPLD | ||
- | ;check for CF disk not busy, then read the master boot record to 0xB000 | + | ;check for CF disk not busy, then read the master boot record to 0xB080 |
- | ; execute the program starting from 0xB000 | + | ; execute the program starting from 0xB080 |
CFdata | CFdata | ||
CFerr equ 011h ;CF error reg | CFerr equ 011h ;CF error reg | ||
Line 20: | Line 20: | ||
org 0 | org 0 | ||
- | | + | |
- | | + | |
- | | + | |
- | ld hl,0b000h | + | |
; check for disk not busy | ; check for disk not busy | ||
readbsy: | readbsy: | ||
in a, | in a, | ||
- | | + | |
- | jr nz,readbsy | + | jr c,readbsy |
- | ;reg A is already 0 | + | ; do not need to set up sector/ |
- | ld b,a ;make reg B zero | + | ; they are set by default after reset |
- | ;; do not need to set up sector/ | + | |
- | ;; they are set by default after reset | + | |
; out (CF1623), | ; out (CF1623), | ||
; out (CF815),a | ; out (CF815),a | ||
Line 47: | Line 45: | ||
jr z,chkdrq | jr z,chkdrq | ||
- | inir ;z80 read 256 bytes | + | |
- | jp 0b000h | + | ld hl, |
- | + | ld b,l | |
- | end | + | |
+ | jp 0b080h | ||
</ | </ | ||