home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG051.ARC
/
BASLORES.MAC
< prev
next >
Wrap
Text File
|
1979-12-31
|
2KB
|
54 lines
;BASLORES.MAC SOURCE FILE FOR BASLORES.BAS BY MARK BISHOP v21/6/86.
;LOADS MICROBEE/TANDY TRS-80 LORES GRAPHICS ;INTO PCG, FOR USE UNDER
;MICROSOFT BASIC 80, MBASIC.COM WITH 24 LINE SCREEN
;EACH PCG CHR HAS 11 BYTES, ;c/w MW BASIC 16.
;BYTES 12-16 ARE UNUSED. LORES GRAPHICS ARE 3 ROWS * 2 COLUMNS.
; -----------------
; | bit 0 | bit 1 | EACH 'BOX' IS SET IF THE
; |---------------| BIT IN THE CHR NO. IS
; | bit 2 | bit 3 | ALSO SET. BIT 6 IGNORED,
; |---------------| BIT 7 ALWAYS SET.
; | bit 4 | bit 5 |
; -----------------
;ROWS 1/3 IN PCG CHR= 4 BYTES, ROW 2= 3 BYTES.
.z80
org 100h ;RELOCATEABLE
;
PCGRAM EQU 0F800H ;START OF PCG RAM
LD HL,PCGRAM
LD C,0C0H ;FOR CHRS 128-191
;CHANGE TO 80H TO REPEAT GRAPHICS IN CHRS 128-255
;
LP1: LD E,C ;ONLY BITS 0-5
;AFFECT CHR
LD D,03H ;COUNTER. 3 ROWS
LP2: XOR A ;A=NEXT PCG BYTE
BIT 0,E
JR Z,LP3 ;IF BIT 0 SET,
OR 0F0H ;SET LEFT COLUMN
LP3: BIT 1,E
JR Z,LP4 ;IF BIT 1 SET,
OR 0FH ;SET RIGHT COLUMN
LP4: BIT 0,D ;ROW 1 OR 3 ?
JR NZ,LP5 ;YES, JR
LD B,3 ;ROW 2 HAS 3 BYTES
JR LP6
LP5: LD B,4 ;ROW 1/3, 4 BYTES
LP6: LD (HL),A ;CHR BYTES TO PCG
INC HL
DJNZ LP6 ;LOOP TILL DONE.
RRC E ;READY TO TEST NXT
RRC E ;TWO BITS IN CHR.
DEC D ;CHR FINISHED ?
JR NZ,LP2 ;NO, JR
XOR A ;ZERO A
LD B,5 ;FILL LINES 12-16
LP7: LD (HL),A ;OF PCG CHR WITH 0
INC HL
DJNZ LP7 ;LOOP TILL DONE
INC C ;ALL CHRS FINISHED ?
JR NZ,LP1 ;NO, JR
RET ;YES, RET
;
END
BIT 7