Skip to content

Commit e8397ff

Browse files
committed
Add core namespace to asm lib
1 parent 1440723 commit e8397ff

163 files changed

Lines changed: 4854 additions & 4198 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 59 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,59 @@
1-
;
2-
; CharLeft
3-
; Alvin Albrecht 2002
4-
;
5-
6-
;INCLUDE "SPconfig.def"
7-
;XLIB SPCharLeft
8-
9-
; Char Left
10-
;
11-
; Adjusts screen address HL to move one character to the left
12-
; on the display. Start of line wraps to the previous row.
13-
;
14-
; enter: HL = valid screen address
15-
; Carry reset
16-
; exit : Carry = moved off screen
17-
; HL = moves one character left, with line wrap
18-
; used : AF, HL
19-
20-
;IF !DISP_HIRES
21-
22-
SP.CharLeft:
23-
ld a,l
24-
dec l
25-
or a
26-
ret nz
27-
ld a,h
28-
sub $08
29-
ld h,a
30-
cp $40
31-
ret
32-
33-
;ELSE
34-
35-
;.SPCharLeft
36-
; ld a,h
37-
; xor $20
38-
; ld h,a
39-
; cp $58
40-
; ccf
41-
; ret nc
42-
; ld a,l
43-
; dec l
44-
; or a
45-
; ret nz
46-
; ld a,h
47-
; sub $08
48-
; ld h,a
49-
; and $18
50-
; cp $18
51-
; ccf
52-
; ret
53-
54-
; ENDIF
1+
;
2+
; CharLeft
3+
; Alvin Albrecht 2002
4+
;
5+
6+
;INCLUDE "SPconfig.def"
7+
;XLIB SPCharLeft
8+
9+
; Char Left
10+
;
11+
; Adjusts screen address HL to move one character to the left
12+
; on the display. Start of line wraps to the previous row.
13+
;
14+
; enter: HL = valid screen address
15+
; Carry reset
16+
; exit : Carry = moved off screen
17+
; HL = moves one character left, with line wrap
18+
; used : AF, HL
19+
20+
;IF !DISP_HIRES
21+
22+
push namespace core
23+
24+
SP.CharLeft:
25+
ld a,l
26+
dec l
27+
or a
28+
ret nz
29+
ld a,h
30+
sub $08
31+
ld h,a
32+
cp $40
33+
ret
34+
35+
pop namespace
36+
37+
38+
;ELSE
39+
40+
;.SPCharLeft
41+
; ld a,h
42+
; xor $20
43+
; ld h,a
44+
; cp $58
45+
; ccf
46+
; ret nc
47+
; ld a,l
48+
; dec l
49+
; or a
50+
; ret nz
51+
; ld a,h
52+
; sub $08
53+
; ld h,a
54+
; and $18
55+
; cp $18
56+
; ccf
57+
; ret
58+
59+
; ENDIF
Lines changed: 54 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,54 @@
1-
;
2-
; CharRight
3-
; Alvin Albrecht 2002
4-
;
5-
6-
;INCLUDE "SPconfig.def"
7-
;XLIB SPCharRight
8-
9-
; Char Right
10-
;
11-
; Adjusts screen address HL to move one character to the right
12-
; on the display. End of line wraps to the next row.
13-
;
14-
; enter: HL = valid screen address
15-
; Carry reset
16-
; exit : Carry = moved off screen
17-
; HL = moves one character right, with line wrap
18-
; used : AF, HL
19-
20-
;IF !DISP_HIRES
21-
22-
SP.CharRight:
23-
inc l
24-
ret nz
25-
ld a,8
26-
add a,h
27-
ld h,a
28-
cp $58
29-
ccf
30-
ret
31-
32-
;ELSE
33-
34-
;.SPCharRight
35-
; ld a,h
36-
; xor $20
37-
; ld h,a
38-
; cp $58
39-
; ret nc
40-
; inc l
41-
; ret nz
42-
; ld a,8
43-
; add a,h
44-
; ld h,a
45-
; cp $58
46-
; ccf
47-
; ret
48-
49-
; ENDIF
1+
;
2+
; CharRight
3+
; Alvin Albrecht 2002
4+
;
5+
6+
;INCLUDE "SPconfig.def"
7+
;XLIB SPCharRight
8+
9+
; Char Right
10+
;
11+
; Adjusts screen address HL to move one character to the right
12+
; on the display. End of line wraps to the next row.
13+
;
14+
; enter: HL = valid screen address
15+
; Carry reset
16+
; exit : Carry = moved off screen
17+
; HL = moves one character right, with line wrap
18+
; used : AF, HL
19+
20+
;IF !DISP_HIRES
21+
22+
push namespace core
23+
24+
SP.CharRight:
25+
inc l
26+
ret nz
27+
ld a,8
28+
add a,h
29+
ld h,a
30+
cp $58
31+
ccf
32+
ret
33+
34+
pop namespace
35+
36+
37+
;ELSE
38+
39+
;.SPCharRight
40+
; ld a,h
41+
; xor $20
42+
; ld h,a
43+
; cp $58
44+
; ret nc
45+
; inc l
46+
; ret nz
47+
; ld a,8
48+
; add a,h
49+
; ld h,a
50+
; cp $58
51+
; ccf
52+
; ret
53+
54+
; ENDIF

0 commit comments

Comments
 (0)