-
Notifications
You must be signed in to change notification settings - Fork 2
/
printany.asm
82 lines (72 loc) · 1.75 KB
/
printany.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
;Plot to absolute address in display file..
;Plots a udg with no attributes....
;Pages to segment 3..
;Entry: a=character (udg!) (64-128)
; b=y pos c=x pos
;Exit a=udg character -64
;
; Assumptions:
; sbrbank = $21
; sbraddr = $7800 (+offset)
MODULE absplot
SECTION code
defc SBRBANK = $21
defc SBRADDR = $7800
XDEF plotabs
XDEF jimmyattr
.plotabs
ex af,af'
ld a,($4D1)
push af
ld a,SBRBANK
ld ($4D1),a
out ($D1),a
ld hl,SBRADDR
ld d,b ;each row is 256 bytes
ld e,0
add hl,de
ld e,c
ld d,0
add hl,de
add hl,de ;each char is two bytes..
;hl now points to address in display file of
ex af,af
sub 64
cpl
ld (hl),a
ex af,af
inc hl
ld (hl),@10000001
pop af
ld ($4D1),a
out ($D1),a
ex af,af
cpl
ret
.jimmyattr
ex af,af'
ld a,($4D1)
push af
ld a,SBRBANK
ld ($4D1),a
out ($D1),a
ld hl,SBRADDR
ld d,b ;each row is 256 bytes
ld e,0
add hl,de
ld e,c
ld d,0
add hl,de
add hl,de ;each char is two bytes..
;hl now points to address in display file of
ex af,af
inc hl
ld (hl),a
pop af
ld ($4D1),a
out ($D1),a
ex af,af
cpl
ret
;add 0 or 1 = tiny
;add 64 or 1 = gubbins