Archived
1
0

create machine code files

This commit is contained in:
Erick
2022-03-27 14:37:27 +02:00
parent c3d48c6241
commit 20d74eeac2
3 changed files with 42 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
segment .text
global main
main:
segment .data
dt screen 16384 ; 16-bit screen memory allocation
dt kbd 24576 ; 16-bit keyboard memory allocation
+8
View File
@@ -0,0 +1,8 @@
segment .text
global main
main:
segment .data
var
+25
View File
@@ -0,0 +1,25 @@
section.text
global main
main:
section.data
; allocating n.8 16-bit registers
dw R0 0
dw R1 1
dw R2 2
dw R3 3
dw R4 4
dw R5 5
dw R6 6
dw R7 7
; allocating special registers for high-level usage
dw SP 0
dw LCL 1
dw ARG 2
dw THIS 3
dw THAT 4
; section.bss