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
/
MBUG013.ARC
/
COLINIT2.PRO
< prev
next >
Wrap
Text File
|
1979-12-31
|
3KB
|
60 lines
procedure INIT;
{ Procedure to intercept the CONOUT routine
and allow the colour byte to be saved in RAM
so that the color procedure will allow the
colours set to operate for each character as
it is printed to screen.
Developed by Bob and Alan Burt to allow the
creation of colour commands in Turbo Pascal
for the MicroBee. }
{ ORG 1FE7H
;
DEFR 16
;
PORT8 EQU 8 ;col_port control
PORT9 EQU 9 ;colour PIO wait
COPTR EQU 0A7H ;ConOutPtr addr
CURSOR EQU 0DF5BH ;curs pos 64k
; }
begin
inline ($E5/ {INIT PUSH HL }
$2A/$A7/0/ { LD HL,(COPTR) }
$22/*+38/ { LD (JMP+1),HL }
$21/*+7/ { LD HL,CHR }
$22/$A7/0/ { LD (COPTR),HL }
$E1/ { POP HL }
$C9/ { RET }
{ ; }
{ ;Routine to save colour byte to RAM }
{ ; }
$F5/ {CHR PUSH AF }
$E5/ { PUSH HL }
$2A/$5B/$DF/{CURS LD HL,(CURSOR) ;get screen curs pos }
$7C/ { LD A,H }
$C6/8/ { ADD A,8 ;col_RAM offset }
$67/ { LD H,A ;msb cursor position }
$AF/ { XOR A }
$D3/9/ { OUT (PORT9),A ;wait Z80 }
$3E/$40/ { LD A,40H }
$D3/8/ { OUT (PORT8),A }
$3A/*+13/ { LD A,(SCRTCH) ;colour byte }
$77/ { LD (HL),A ;save in RAM }
$3A/*+10/ { LD A,(SCRTCH+1) ;intensity byte }
$D3/8/ { OUT (PORT8),A ;reset PCG RAM }
$E1/ { POP HL }
$F1/ { POP AF }
$C3/0/0/ {JMP JP 0 ;CONOUT vector here }
{ ; }
2/ {SCRTCH DEFB 2 ;default colour byte }
{ ; green/black }
$0E) { DEFB 0EH ;intensity byte }
end; {procedure init}