80-Bus News

  

September–October 1983, Volume 2, Issue 5











Page 53 of 67











LISTING 3

MV256 Screen Dump to Epson FX80

dump:

»Z80

ld a,er eall output R

jMake sure we start new line

soutput linefeed selector

1d a,ese eall output R

ld a,three call output R

ld a,twnty4 call output R

call getpar R

ld ix,dumpmod ld (ixt1),a ld de, OOffh

nxtrow: Id a,ese

row:

call output R

ld a,"*” eall output R

ld a,gr4 call output R

14 4,0

call output R

1d a,t

call output R

push de

1d b,8

14 c,0

1d h1,0000h

makbyt: call getcol

R

dumpmod:ep 0

skip: skipi:

dr nz,skip defb Ocbh,31h

jr skip1 slac

dec e

djngz makbyt pop de

ine 1

jr nz,row 1d a,er call output R

ld a,lf

sselect linefeed spacing 24/216” ;Spacing parameter

sget background colour

sstore colour at appropriate location

sSet B=255, D=0

soutput graphline selectors

s;select graphics mode 4

gno. chars mod 255

sno. chars div 255

;s8ave row

sinitialise byte for output sset L=O, colum pointer, H=0

stest colour at pixel

sdoes it differ from background?

;*** UNDOCUMENTED Z80 INSTRUCTION ##+ sshifts register C left one bit, with sa one shifting in from right

sset bit equal to 0 sadjust row pointer

srestore top row

call output R

3E = E-8 push hl

ex de,hi ;rows now in hl ld de,8

ora

sbc hl,de

ex de,hl

pop hl

jv ne,nxtrow

jreset line feeds

ld a,esc eall output R

1d a, two call output R

ret

zsoutput CRLF

jreset line spacing

if equ Oah er equ Odh ffeed equ Och esc equ 1bh gr4 equ 04h one equ “1” twnty4 equ 24 ;linefeed spacing

jlinefeed character ;carriage return s;form feed character

3;selector for graphics mode 4

output: push af push be push de push hl push ix push iy ld e,a stransfer byte to be transmitted to correct reg 1d 0,5 sselect LST: device eall bdos pop iy pop ix pop hl pop de pop be pop af return

save registers

END

LISTING 4

521 REM REPLACE PREVIOUS CODE AT 521 et seq with 522 C=0:REM SELECT BLACK BACKGROUND COLOUR

523 CALL DUMP(C)

524 END

*#** ADD TO PRIMDEF FOLLOWING LINE *## 399 DUMP=MVBASE+99:REM THIS DEFINES DUMP’S VALUE FOR CALL

53


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 53 of 67