mirror of
https://github.com/irmen/prog8.git
synced 2025-11-02 13:16:07 +00:00
added txt.rvs_on() and txt.rvs_off(), added txt.color() support for virtual target
This commit is contained in:
@@ -23,6 +23,14 @@ txt {
|
|||||||
chrout(' ')
|
chrout(' ')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub rvs_on() {
|
||||||
|
txt.chrout(18)
|
||||||
|
}
|
||||||
|
|
||||||
|
sub rvs_off() {
|
||||||
|
txt.chrout(146)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
asmsub print (str text @ AY) clobbers(A,Y) {
|
asmsub print (str text @ AY) clobbers(A,Y) {
|
||||||
; ---- print zero terminated string, in PETSCII encoding, from A/Y
|
; ---- print zero terminated string, in PETSCII encoding, from A/Y
|
||||||
|
|||||||
@@ -53,6 +53,21 @@ sub uppercase() {
|
|||||||
; not supported
|
; not supported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub rvs_on() {
|
||||||
|
print("\x1b[7m")
|
||||||
|
}
|
||||||
|
|
||||||
|
sub rvs_off() {
|
||||||
|
print("\x1b[0m")
|
||||||
|
}
|
||||||
|
|
||||||
|
sub color (ubyte txtcol) {
|
||||||
|
print("\x1b[3")
|
||||||
|
chrout('0' + txtcol)
|
||||||
|
chrout('m')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sub chrout(ubyte char) {
|
sub chrout(ubyte char) {
|
||||||
%ir {{
|
%ir {{
|
||||||
loadm.b r99100,txt.chrout.char
|
loadm.b r99100,txt.chrout.char
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
||||||
Prerelease version from git commit 06e16789 in branch master
|
Prerelease version from git commit 8a717c74 in branch master
|
||||||
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
||||||
|
|
||||||
Compiling program import-all-c128.p8
|
Compiling program import-all-c128.p8
|
||||||
@@ -785,6 +785,8 @@ txt {
|
|||||||
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
||||||
print_w (word value @AY) -> clobbers (A,X,Y)
|
print_w (word value @AY) -> clobbers (A,X,Y)
|
||||||
row (ubyte rownum @A) -> clobbers (A,X,Y)
|
row (ubyte rownum @A) -> clobbers (A,X,Y)
|
||||||
|
rvs_off ()
|
||||||
|
rvs_on ()
|
||||||
scroll_down (bool alsocolors @Pc) -> clobbers (A,X)
|
scroll_down (bool alsocolors @Pc) -> clobbers (A,X)
|
||||||
scroll_left (bool alsocolors @Pc) -> clobbers (A,X,Y)
|
scroll_left (bool alsocolors @Pc) -> clobbers (A,X,Y)
|
||||||
scroll_right (bool alsocolors @Pc) -> clobbers (A,X)
|
scroll_right (bool alsocolors @Pc) -> clobbers (A,X)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
||||||
Prerelease version from git commit 06e16789 in branch master
|
Prerelease version from git commit 8a717c74 in branch master
|
||||||
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
||||||
|
|
||||||
Compiling program import-all-c64.p8
|
Compiling program import-all-c64.p8
|
||||||
@@ -898,6 +898,8 @@ txt {
|
|||||||
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
||||||
print_w (word value @AY) -> clobbers (A,X,Y)
|
print_w (word value @AY) -> clobbers (A,X,Y)
|
||||||
row (ubyte rownum @A) -> clobbers (A,X,Y)
|
row (ubyte rownum @A) -> clobbers (A,X,Y)
|
||||||
|
rvs_off ()
|
||||||
|
rvs_on ()
|
||||||
scroll_down (bool alsocolors @Pc) -> clobbers (A,X)
|
scroll_down (bool alsocolors @Pc) -> clobbers (A,X)
|
||||||
scroll_left (bool alsocolors @Pc) -> clobbers (A,X,Y)
|
scroll_left (bool alsocolors @Pc) -> clobbers (A,X,Y)
|
||||||
scroll_right (bool alsocolors @Pc) -> clobbers (A,X)
|
scroll_right (bool alsocolors @Pc) -> clobbers (A,X)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
||||||
Prerelease version from git commit 06e16789 in branch master
|
Prerelease version from git commit 8a717c74 in branch master
|
||||||
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
||||||
|
|
||||||
Compiling program import-all-cx16.p8
|
Compiling program import-all-cx16.p8
|
||||||
@@ -1382,6 +1382,8 @@ txt {
|
|||||||
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
||||||
print_w (word value @AY) -> clobbers (A,X,Y)
|
print_w (word value @AY) -> clobbers (A,X,Y)
|
||||||
row (ubyte rownum @A) -> clobbers (A,X,Y)
|
row (ubyte rownum @A) -> clobbers (A,X,Y)
|
||||||
|
rvs_off ()
|
||||||
|
rvs_on ()
|
||||||
scroll_down () -> clobbers (A,X,Y)
|
scroll_down () -> clobbers (A,X,Y)
|
||||||
scroll_left () -> clobbers (A,X,Y)
|
scroll_left () -> clobbers (A,X,Y)
|
||||||
scroll_right () -> clobbers (A,X,Y)
|
scroll_right () -> clobbers (A,X,Y)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
||||||
Prerelease version from git commit 06e16789 in branch master
|
Prerelease version from git commit 8a717c74 in branch master
|
||||||
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
||||||
|
|
||||||
Compiling program import-all-pet32.p8
|
Compiling program import-all-pet32.p8
|
||||||
@@ -503,6 +503,8 @@ txt {
|
|||||||
print_uwbin (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
print_uwbin (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
||||||
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
print_uwhex (uword value @AY, bool prefix @Pc) -> clobbers (A,X,Y)
|
||||||
print_w (word value @AY) -> clobbers (A,X,Y)
|
print_w (word value @AY) -> clobbers (A,X,Y)
|
||||||
|
rvs_off ()
|
||||||
|
rvs_on ()
|
||||||
scroll_down () -> clobbers (A,X)
|
scroll_down () -> clobbers (A,X)
|
||||||
scroll_left () -> clobbers (A,X,Y)
|
scroll_left () -> clobbers (A,X,Y)
|
||||||
scroll_right () -> clobbers (A,X)
|
scroll_right () -> clobbers (A,X)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
Prog8 compiler v12.0-SNAPSHOT by Irmen de Jong (irmen@razorvine.net)
|
||||||
Prerelease version from git commit 06e16789 in branch master
|
Prerelease version from git commit 8a717c74 in branch master
|
||||||
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html
|
||||||
|
|
||||||
Compiling program import-all-virtual.p8
|
Compiling program import-all-virtual.p8
|
||||||
@@ -526,6 +526,7 @@ txt {
|
|||||||
chrout (ubyte char)
|
chrout (ubyte char)
|
||||||
clear_screen ()
|
clear_screen ()
|
||||||
cls ()
|
cls ()
|
||||||
|
color (ubyte txtcol)
|
||||||
column (ubyte col)
|
column (ubyte col)
|
||||||
height () -> ubyte
|
height () -> ubyte
|
||||||
home ()
|
home ()
|
||||||
@@ -548,6 +549,8 @@ txt {
|
|||||||
print_uwbin (uword value, bool prefix)
|
print_uwbin (uword value, bool prefix)
|
||||||
print_uwhex (uword value, bool prefix)
|
print_uwhex (uword value, bool prefix)
|
||||||
print_w (word value)
|
print_w (word value)
|
||||||
|
rvs_off ()
|
||||||
|
rvs_on ()
|
||||||
setchr (ubyte col, ubyte row, ubyte char)
|
setchr (ubyte col, ubyte row, ubyte char)
|
||||||
spc ()
|
spc ()
|
||||||
uppercase ()
|
uppercase ()
|
||||||
|
|||||||
Reference in New Issue
Block a user