update vtui example to vtui 1.0

This commit is contained in:
Irmen de Jong 2023-01-24 00:58:16 +01:00
parent 4403e4ed62
commit 8cda8a727c
4 changed files with 5 additions and 7 deletions

Binary file not shown.

Binary file not shown.

View File

@ -110,10 +110,10 @@ char_loop:
vtui $1000 { vtui $1000 {
%asmbinary "VTUI0.9.BIN", 2 ; skip the 2 dummy load address bytes %asmbinary "VTUI1.0.BIN", 2 ; skip the 2 dummy load address bytes
; NOTE: base address $1000 here must be the same as the block's memory address, for obvious reasons! ; NOTE: base address $1000 here must be the same as the block's memory address, for obvious reasons!
; The routines below are for VTUI 0.8 ; The routines below are for VTUI 1.0
romsub $1000 = initialize() clobbers(A, X, Y) romsub $1000 = initialize() clobbers(A, X, Y)
romsub $1002 = screen_set(ubyte mode @A) clobbers(A, X, Y) romsub $1002 = screen_set(ubyte mode @A) clobbers(A, X, Y)
romsub $1005 = set_bank(ubyte bank @Pc) clobbers(A) romsub $1005 = set_bank(ubyte bank @Pc) clobbers(A)
@ -133,6 +133,9 @@ vtui $1000 {
romsub $102f = save_rect(ubyte ramtype @A, ubyte vbank @Pc, uword address @R0, ubyte width @R1, ubyte height @R2) clobbers(A, X, Y) romsub $102f = save_rect(ubyte ramtype @A, ubyte vbank @Pc, uword address @R0, ubyte width @R1, ubyte height @R2) clobbers(A, X, Y)
romsub $1032 = rest_rect(ubyte ramtype @A, ubyte vbank @Pc, uword address @R0, ubyte width @R1, ubyte height @R2) clobbers(A, X, Y) romsub $1032 = rest_rect(ubyte ramtype @A, ubyte vbank @Pc, uword address @R0, ubyte width @R1, ubyte height @R2) clobbers(A, X, Y)
romsub $1035 = input_str(uword buffer @R0, ubyte buflen @Y, ubyte colors @X) clobbers (A) -> ubyte @Y romsub $1035 = input_str(uword buffer @R0, ubyte buflen @Y, ubyte colors @X) clobbers (A) -> ubyte @Y
romsub $1038 = get_bank() clobbers (A) -> ubyte @Pc
romsub $103b = get_stride() -> ubyte @A
romsub $103e = get_decr() clobbers (A) -> ubyte @Pc
; -- helper function to do string length counting for you internally, and turn the convertchars flag into a boolean again ; -- helper function to do string length counting for you internally, and turn the convertchars flag into a boolean again
asmsub print_str2(str txtstring @R0, ubyte colors @X, ubyte convertchars @Pc) clobbers(A, Y) { asmsub print_str2(str txtstring @R0, ubyte colors @X, ubyte convertchars @Pc) clobbers(A, Y) {

View File

@ -12,11 +12,6 @@ main {
str name="irmen" str name="irmen"
sub start() { sub start() {
for cx16.r0 in 0 to 10 {
cx16.r1++
}
txt.print("= 10 ") txt.print("= 10 ")
txt.print_ub(zpvar) txt.print_ub(zpvar)
txt.nl() txt.nl()