nop
nop
;; screen dump to printer.
sub_0a028h:
ld a,013h
sub_a050h:
ld a,000h
ld (0a12ch),a;; accumulated pixels.
ld de,(0a12dh)
call sub_a10dh;; store current graphics position
call 0bbf0h ;; gra test absolute
ld de,00001h
call sub_a11dh;; get pixel
ld de,00002h
call sub_a11dh;; get pixel
ld de,00004h
call sub_a11dh;; get pixel
ld de,00008h
call sub_a11dh;; get pixel
ld de,00010h
call sub_a11dh;; get pixel
ld de,00020h
call sub_a11dh;; get pixel
ld de,00040h
call sub_a0ffh;; get pixel
la0c9h:
call 0bd2eh ;; mc busy printer
jr c,la0c9h
call 0bd28h ;; mc reset printer
ld a,01bh ;; ESC
call 0bd2bh ;; mc print char
ld a,04bh ;; K
call 0bd2bh ;; mc print char
ld a,000h ;; number of columns low byte
call 0bd2bh ;; mc print char
ld a,(0a133h)
bit 0,a
jr z,la0b4h
ld a,002h ;; number of columns high byte?
call 0bd2bh ;; mc print char
ld a,(0a12ch);; pixel data
call 0bd2bh ;; mc print char
jr la0f9h
la0b4h:
ld a,001h ;; number of columns high byte?
call 0bd2bh ;; mc print char
la0f9h:
ld a,(0a12ch);; pixel data
call 0bd2bh ;; mc print char
call sub_a115h
inc hl
cp 090h
jp nz,sub_a050h
ld a,00ah ;; next line
call 0bd2bh ;; mc print char
ld a,02fh ;; 47 - space
call 0bb1eh ;; km test key
ret nz
ret
;; accumulate pixels
sub_a0ffh:
ld b,a
call 0bb99h ;; txt get paper
cp b ;; was the colour read the same as the paper?
ret z
;; any pixel which is not the same as the paper will be considered foreground
;; and the printer will draw a dot. Any pixel the same as the paper will
;; be considered background and no dot is drawn by the printer.
;; pixel is set to foreground. accumulate it into the pixel data so far
ld hl,(0a12ch)
add hl,de
sub_a11dh:
call sub_a0ffh;; accumulate a pixel for printing. call sub_a115h;; get current X/Y graphics position inc de ;; increment X to next pixel accross screen.
inc de
inc de call sub_a10dh;; set current X/Y graphics position
call 0bbf0h ;; gra test absolute
ret
ld (0a24eh),bc
call sub_a210
ld a,02fh ;; 47 - space
call 0bb1eh ;; km test key
ret nz