7471
This commit is contained in:
parent
520e3c2542
commit
1e02d840e8
|
@ -135,6 +135,13 @@ Here's an example program in Mu:
|
|||
|
||||
<img alt='ex2.mu' src='html/ex2.mu.png' width='400px'>
|
||||
|
||||
To reproduce it:
|
||||
|
||||
```sh
|
||||
$ ./translate_mu_baremetal baremetal/ex2.mu # emit disk.img
|
||||
$ qemu-system-i386 disk.img
|
||||
```
|
||||
|
||||
[More details on Mu syntax →](mu.md)
|
||||
|
||||
Here's an example program in SubX:
|
||||
|
|
|
@ -15,12 +15,12 @@ fn main {
|
|||
{
|
||||
compare y, 0x300 # 768
|
||||
break-if->=
|
||||
var color/ecx: int <- copy y
|
||||
color <- and 0xff
|
||||
var x/edx: int <- copy 0
|
||||
{
|
||||
compare x, 0x400 # 1024
|
||||
break-if->=
|
||||
var color/ecx: int <- copy x
|
||||
color <- and 0xff
|
||||
pixel 0, x, y, color
|
||||
x <- increment
|
||||
loop
|
||||
|
|
Loading…
Reference in New Issue