mirror of
https://github.com/pnx/m16vm
synced 2026-06-16 03:44:55 +02:00
examples/asm/hello_world.as: fix movl with 7+ offsets.
movl (type RI) have signed 4 byte offset. Resulting in errors with offsets larger than 7.
This commit is contained in:
parent
dea723ad7a
commit
df58899353
1 changed files with 5 additions and 3 deletions
|
|
@ -15,14 +15,16 @@ movl $0x1, 87 ; W
|
|||
sw $0x0, $0x1, 6
|
||||
movl $0x1, 79 ; O
|
||||
sw $0x0, $0x1, 7
|
||||
movl $0x0, 8
|
||||
movl $0x1, 82 ; R
|
||||
sw $0x0, $0x1, 8
|
||||
sw $0x0, $0x1, 0
|
||||
movl $0x1, 76 ; L
|
||||
sw $0x0, $0x1, 9
|
||||
sw $0x0, $0x1, 1
|
||||
movl $0x1, 68 ; D
|
||||
sw $0x0, $0x1, 10
|
||||
sw $0x0, $0x1, 2
|
||||
|
||||
; -- setup print loop.
|
||||
movl $0x0, 0
|
||||
movl $0x1, 1 ; Load 1 in R1 (used for increment the counter)
|
||||
_start:
|
||||
ld $0xF, $0x0, 0 ; Load memory address stored in R0 into R15
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue