added txt.column()

This commit is contained in:
Irmen de Jong 2021-02-10 22:47:49 +01:00
parent 321fdd10d1
commit 1bbd77fddb
3 changed files with 91 additions and 61 deletions

View File

@ -31,6 +31,16 @@ sub spc() {
txt.chrout(' ')
}
asmsub column(ubyte col @A) clobbers(A, X, Y) {
; ---- set the cursor on the given column (starting with 0) on the current line
%asm {{
sec
jsr c64.PLOT
tay
clc
jmp c64.PLOT
}}
}
asmsub fill_screen (ubyte char @ A, ubyte color @ Y) clobbers(A) {
; ---- fill the character screen with the given fill character and character color.

View File

@ -31,6 +31,16 @@ sub spc() {
txt.chrout(' ')
}
asmsub column(ubyte col @A) clobbers(A, X, Y) {
; ---- set the cursor on the given column (starting with 0) on the current line
%asm {{
sec
jsr c64.PLOT
tay
clc
jmp c64.PLOT
}}
}
asmsub fill_screen (ubyte char @ A, ubyte color @ Y) clobbers(A) {
; ---- fill the character screen with the given fill character and character color.

View File

@ -4,6 +4,16 @@
main {
sub start() {
txt.print("hello")
txt.print("hello\n")
txt.column(3)
txt.print("hello2\n")
txt.column(8)
txt.print("hello3\n")
txt.column(34)
txt.print("hello4\n")
txt.column(1)
txt.print("hello5\n")
txt.column(0)
txt.print("hello6\n")
}
}