Skip to content

Commit

Permalink
tcc: Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed May 27, 2024
1 parent 6a1a265 commit a73c014
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# fox32 Demos and Tutorials

- [boot](boot) - bootable demo programs
- [demos](demos) - demo programs
- [tutorials](tutorials) - getting started tutorials
- [cputest](cputest) - CPU test suite
Expand Down
29 changes: 29 additions & 0 deletions boot/tcc.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
; tiny code christmas in fox32 assembly. draws a little pattern to the screen
; run this as a boot sector (i.e. pass to fox32 as a bootable disk)

opton
org 0x00000800

mov r11, 479 ; Y counter
y_loop:
mov r10, 639 ; X counter
x_loop:
mov r0, r10
mov r1, r11
add r1, 16
mov r2, r10
xor r2, r11
rem r2, 3
mul r2, 128
or r2, 0xFF000000
call [0xF004201C] ; draw_pixel_to_background
dec r10
ifnz rjmp x_loop
dec r11
ifnz rjmp y_loop

rjmp 0

; bootable magic bytes
org.pad 0x000009FC
data.32 0x523C334C

0 comments on commit a73c014

Please sign in to comment.