mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 11:16:42 +01:00
fix control codes 4-6 as parameters to other control codes
This commit is contained in:
Binary file not shown.
@@ -372,16 +372,7 @@ export fn printChar(char: i32) {
|
|||||||
global mut controlCodeLength = 0;
|
global mut controlCodeLength = 0;
|
||||||
|
|
||||||
fn printSingleChar(char: i32) {
|
fn printSingleChar(char: i32) {
|
||||||
if char >= 4 & char <= 6 {
|
if outputChannel >= 2 & (char < 4 | char > 6) {
|
||||||
outputChannel = char - 4;
|
|
||||||
if !outputChannel {
|
|
||||||
textCursorX = 0;
|
|
||||||
textCursorY = 0;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if outputChannel >= 2 {
|
|
||||||
logChar(char);
|
logChar(char);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -399,6 +390,15 @@ fn printSingleChar(char: i32) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if char >= 4 & char <= 6 {
|
||||||
|
outputChannel = char - 4;
|
||||||
|
if !outputChannel {
|
||||||
|
textCursorX = 0;
|
||||||
|
textCursorY = 0;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if char == 7 {
|
if char == 7 {
|
||||||
80?0 = 80?0 ^ 2;
|
80?0 = 80?0 ^ 2;
|
||||||
return;
|
return;
|
||||||
|
|||||||
13
test/text_modes.cwa
Normal file
13
test/text_modes.cwa
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
include "../examples/include/microw8-api.cwa"
|
||||||
|
|
||||||
|
export fn upd() {
|
||||||
|
printString(USER_MEM);
|
||||||
|
}
|
||||||
|
|
||||||
|
data USER_MEM {
|
||||||
|
i8(12, 31, 5, 6) "Text mode"
|
||||||
|
i8(5, 31, 4, 5) "Graphics mode"
|
||||||
|
i8(6) "Console output\nSecond line\n"
|
||||||
|
i8(4, 31, 4, 12) "Back to text mode"
|
||||||
|
i8(0)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user