123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- spt_con_print: pop hl
- con_print:
- ld a,004h ; Select display memory
- out (0c8h),a ; Output to screen Map and system control
- .loop:
- ld a,(HL) ; get message char
- or a ; test for null
- jr z, .done ; return if done
- ld (ix+1),A ; store char
- inc ix ; advance screen pointer
- inc ix
- inc hl ; advance message pointer
- jr .loop ; continue
- .done:
- xor a ;054b Reset map
- out (0c8h),a ;054c Reset to memory Map and system control
- ret
- con_home: ld ix,VBASE
- ret
- spt_con_goto: pop ix
- ret
- con_NL:
- ld a,ixl ; go to beginning of line
- and $af ; then go to the next line
- add a,$a0
- ld ixl,a ; store the low byte back
- jr nc,.skip
- inc ixh ; fix up high byte if there was a carry
- .skip:
- ret
- con_clear:
- ld hl,VBASE
- ld bc,VSIZE
- ld a,004h ; Select display memory
- out (0c8h),a ; Output to screen Map and system control
- .loop:
- ld (hl),000h ;Put 00h in even byte
- inc hl ; bump
- ld (hl),020h ;Put 20h in odd byte
- dec bc
- cpi ; increments HL, decrements BC (and does a CP)
- jp pe, .loop
- xor a ; Reset A
- ld ix,VBASE
- out (0c8h),a ;054c Reset to memory Map and system control
- ret
- spt_con_index: pop bc
- con_index:
- add ix,bc
- ret
|