home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 83
/
083.d81
/
hardcopy.ebud
< prev
next >
Wrap
Text File
|
2022-08-26
|
1KB
|
122 lines
.org 49152
.mem
;.obj "ghardcopy.o"
;hardcopy of screen
;sys49152,lm,tm,rm,bm,sa,gon,goff
;sys49152,x,y,x1,y1,secondary address,chr$(graphic mode on),chr$(graphic mode off)
setlfs = 65466
open = 65472
chkout = 65481
chrout = 65490
close = 65475
clrchn = 65484
setnam = 65469
comnum = 47089
screen = 1024
zp = 251
jsr comnum
stx lm
jsr comnum
stx tm
jsr comnum
inx
stx rm
jsr comnum
inx
stx bm
jsr comnum
stx sa
jsr comnum
stx gon
jsr comnum
stx goff
lda <screen
sta zp
lda >screen
sta zp+1
ldy tm
beq printscreen
ldy #0
- clc
lda zp
adc #40
sta zp
lda zp+1
adc #0
sta zp+1
iny
cpy tm
bne -
printscreen =*
jsr clrchn
lda #4
ldx #4
ldy sa
jsr setlfs
lda #0
ldx #0
ldy #0
jsr setnam
jsr open
ldx #4
jsr chkout
ldx tm
- ldy lm
- sty y
lda (zp),y
cmp #0
php
and #127
ldy #4
- dey
cmp upplim,y
bcs -
eor fliptb,y
plp
jsr chrout
ldy y
iny
cpy rm
bne --
lda gon
jsr chrout
lda #13
jsr chrout
lda goff
jsr chrout
clc
lda zp
adc #40
sta zp
lda zp+1
adc #0
sta zp+1
inx
cpx bm
bne ---
lda #4
jsr close
jsr clrchn
rts
y .byte 0
sa .byte 0
rm .byte 0
lm .byte 0
tm .byte 0
bm .byte 0
gon .byte 8
goff .byte 15
upplim .byte 128,96,64,32
fliptb .byte 192,32,0,64