diff options
Diffstat (limited to 'ROMs')
| -rw-r--r-- | ROMs/.DS_Store | bin | 6148 -> 6148 bytes | |||
| -rw-r--r-- | ROMs/font copy.bin | bin | 32768 -> 0 bytes | |||
| -rw-r--r-- | ROMs/font.bin | bin | 32768 -> 2048 bytes | |||
| -rw-r--r-- | ROMs/hello_c.asm | 7 | ||||
| -rw-r--r-- | ROMs/hello_c.c | 4 | ||||
| -rw-r--r-- | ROMs/hello_c.q1 | bin | 0 -> 22 bytes | |||
| -rw-r--r-- | ROMs/hello_world.asm (renamed from ROMs/hello_world.dat) | 15 | ||||
| -rw-r--r-- | ROMs/hello_world.q1 | bin | 32842 -> 2151 bytes | |||
| -rw-r--r-- | ROMs/write_display_direct.asm (renamed from ROMs/write_display_direct.dat) | 0 |
9 files changed, 23 insertions, 3 deletions
diff --git a/ROMs/.DS_Store b/ROMs/.DS_Store Binary files differindex 523af33..775e323 100644 --- a/ROMs/.DS_Store +++ b/ROMs/.DS_Store diff --git a/ROMs/font copy.bin b/ROMs/font copy.bin Binary files differdeleted file mode 100644 index 88e4a93..0000000 --- a/ROMs/font copy.bin +++ /dev/null diff --git a/ROMs/font.bin b/ROMs/font.bin Binary files differindex 88e4a93..89f2af5 100644 --- a/ROMs/font.bin +++ b/ROMs/font.bin diff --git a/ROMs/hello_c.asm b/ROMs/hello_c.asm new file mode 100644 index 0000000..292b99a --- /dev/null +++ b/ROMs/hello_c.asm @@ -0,0 +1,7 @@ +_main: +ADD 1, 2 +SUB 4, 1 +MUL AX, AX +MOV AX, V0 +RET + diff --git a/ROMs/hello_c.c b/ROMs/hello_c.c new file mode 100644 index 0000000..46eab8d --- /dev/null +++ b/ROMs/hello_c.c @@ -0,0 +1,4 @@ +int main() +{ + return (1 + 2) * (4 - 1); +}
\ No newline at end of file diff --git a/ROMs/hello_c.q1 b/ROMs/hello_c.q1 Binary files differnew file mode 100644 index 0000000..deffc80 --- /dev/null +++ b/ROMs/hello_c.q1 diff --git a/ROMs/hello_world.dat b/ROMs/hello_world.asm index 6cdacff..1d812fb 100644 --- a/ROMs/hello_world.dat +++ b/ROMs/hello_world.asm @@ -5,7 +5,7 @@ font: .include "font.bin" program: - MOV 13, V0 ; Load character #12 + MOV 0, V0 ; Load character #12 MOV 0, V1 ; X position MOV 0, V2 ; Y position MOV 1, V3 ; Color (1 = white) @@ -26,8 +26,17 @@ write_char: ADD AX, V1 MOV AX, V4 ; V4 = X position + Y position * 64 (screen index) - MOV [V0 + $1FFF], V5 ; Read character + MOV V4, [$EFFF] ; Debug + + MOV [V0 + $2003], V5 ; Read character (1FFF + 4 since jump address is 1FFF) + MOV V5, [$EFFF] ; Debug + AND V5, $01 ; Mask to get first bit (color) + MOV DX, V5 + MOV V5, [$EFFF] ; Debug MUL V5, V3 ; V5 = Character * Color (color index) MOV AX, V5 ; Store result into V5 - MOV V5, [V4 + $3FFF] ; Write character to screen memory + + MOV V5, [$EFFF] ; Debug + + MOVB V5, [V4 + $402F] ; Write character to screen memory RET
\ No newline at end of file diff --git a/ROMs/hello_world.q1 b/ROMs/hello_world.q1 Binary files differindex 4c1b1cd..fd66ffe 100644 --- a/ROMs/hello_world.q1 +++ b/ROMs/hello_world.q1 diff --git a/ROMs/write_display_direct.dat b/ROMs/write_display_direct.asm index 9fde417..9fde417 100644 --- a/ROMs/write_display_direct.dat +++ b/ROMs/write_display_direct.asm |
