mirror of
https://github.com/irmen/prog8.git
synced 2024-10-19 22:24:17 +00:00
added txt.column()
This commit is contained in:
parent
321fdd10d1
commit
1bbd77fddb
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user