80-Bus News

  

July-August 1983, Volume 2, Issue 4











Page 15 of 55











MV256 Relocating Graphics Drivers Disk read/write routines for MV256

OBIF OB21 OB22 OB23 OB25 0B28 OB29 OB2C OB2E B31

OB34 0B36 OB39 OB3A OB3B OB3D

OB40 OB42 OB43

OB46 OB48

OB49 OB4B OB4E OB4F OBS1 OB53 OB54 OBS5 OB56 OBS7 OB59 OB5B OBS5D OBSF OB61

OBG64 OBE6 OB67

OBGA OB6B OB6C OBED OBGF OB70

20 i cb

D3 cg

06 4 AF D3

1A 13

5F cB CB cB CB £6 ep

D3 1c cD

23 7c BS 20 Dt cg

C2 0000

0080 1A 0005 oces 14 9005

05 OB49

O8EO c2

0080

3

OB7B

M-80

3 Main load down loop

GU1:

GL2:

GL3:

en ON Om bed

GL:

LGhe:

LGL3:

IN PUSH XOR out LD PUSH LD LD CALL LD R

LD CALL POP OR oR CALL R

JR POP CALL R OUT RET

A, (CNTL2) AF

A (ONTL2),A HL,O

HL

DE, TBUF C, SETDMA BDOS DE,FCB ;

C,RDFL BDOS HL

A NZ,GL3 LGLi

NZ,GL2 AF READY

(CNTL2),A

Get a

20 Jun 1983

an ee

\

23:54 PAGE 1-3

Get the current line style and save it Set continuous style

Set HL to (X,Y) = 0,0 Save the screen pointer Set DMA to TBUF start

record into TBUF

on

,

Get screen pointer back Test for end of file Yes, skip screen write Write TBUF to screen

Go and get some more Get the line style back

Go home

Load a buffer full to the screen The

four MSBs of each byte represent 1 to 16 points LSBs rep. the colour.

LD LD XOR OUT ouT LD Inc PUSH LD SRL SRL SRL SRL AND CALL

ouT INC CALL

Inc LD OR

POP RET

B,128 DE, TBUF A (Yom), A (xem), A A, (DE) DE

DE"

yA

fm he O

FH READY

(PENCOL),A E pcoL

HL AH

L

NZ, LGLA DE

of the same colour. The four

Here ee om

nae

Set count to 128 bytes Point to buffer Set X & Y MSBsa to 0

Get a byte

Point to next

Save the pointer

Get pixel count in B

Get the colour in A Send the colour

Fudge the pixel count Put a colour at X,Y

Point to next pixel Test for end of screen

Go home regardless if end Get DE off the stack

MV256 Relocating Graphics Drivers

M-80 20 Jun 1983

Disk read/write routines for MV256

OB71 OB72 OBT74 OB75 OBT77 OB78 OBTA

OB7B

OBTE OBTF OBS OB82 OB84

OB87 OB89 OBSB

OBSE

OB91 oBg2 0B93 OB94

OB96 OB97 OB98 OB99 OB9A OB9B OB9C

OB9E OBA OBA

OBA5 OBA8 OBAA

OBAD OBAF OBBI OBB2 OBB3

1D 20 D1 10 3T cB cg

cD

06 iM

AF 12 13 10

48 23 5E 23 56 D5 DD

DD FE 20

DD D6 32

DD DD oD oD 18

LGL4; DEC B F3 JR NZ, LGL3 POP DE De DINZ LGL2 Scr iF RR A RET

An gn oe em tw

; Plot a pixel at HL (X,Y) PCOL: CALL READY R LD A,H cB our (ycL),A LD A\L cg our (XCL),A CALL READY R 80 LD co out RET

O8E0

A, 80H (CMD) ,A

; Unscramble an FCB name from the 3; and place in FCB for use. 24 FCBi: LD B,36 oce6s LD DE, FCB R XOR A FOBIA: LD (DE),A TNC DE FC DINZ POCBIA ; Get the pointers LD Cc, (HL) INC HL LD 8, (HL) Inc HL LD D, (HL) PUSH DE HH POP Ix ; Test if colon present in second 7E 01 LD A, (1X+1) 34 cp wen 10 JR

NZ, PCB2

23:54 PAGE qa4

Count a pixel

Same colour, round again Get TBUF pointer back More in TBUF? Round again Fudge the Z flag off

TBUF empty, so go home

Send H and L to Y and X

Plot point command

atring pointer in HL

Clear out FCB

Get the string length

Get pointer to atring into Ik

byte

; If colon, put drive number in FCB

TE 00 LD A, (1X) 40 SUB 40H oces LD (FCB) ,A R 23 INC IX 23 INC Ix DEC c DEC c 04 JR FCB3

oe an ee

Get drive letter Convert to number Put in FCB

Point past the drive letter and colon

Dec the string count appropriately

15


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











Page 15 of 55