This commit is contained in:
2025-03-12 12:57:42 +05:00
parent b9fa669fd1
commit ee162a70ed
8 changed files with 89 additions and 15 deletions

View File

@@ -0,0 +1,32 @@
/*
Example of behavior change depending on some condition
*/
.main:
movc ax 1
movc bx 2
gt cx ax bx
jnz @true cx
jz @false cx
.true:
const8 true.msg "true\n"
movc cx @true.msg
movc dx #true.msg
jmp @print
.false
const8 false.msg "false\n"
movc cx @false.msg
movc dx #false.msg
jmp @print
.print:
movc ax 1
movc bx 1
sys
jmp @end
.end:
movc ax 0
exit

View File

@@ -1,12 +1,7 @@
/*
Example of graphical application
Example of self-repeating code section
*/
.main:
le
gt
eq
jif
jel
//TODO loop example
exit

View File

@@ -4,7 +4,7 @@
.data:
// named array of 8-bit values
const8 msg "Hello, World :3\n\0"
const8 msg "Hello, World"
.main:
movc ax 1; // sys_write