From df588993531f87c863141d7230fa59e2f80c1953 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 4 Jan 2019 21:15:30 +0100 Subject: [PATCH] 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. --- examples/asm/hello_world.as | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/asm/hello_world.as b/examples/asm/hello_world.as index f5f5b25..20abf69 100644 --- a/examples/asm/hello_world.as +++ b/examples/asm/hello_world.as @@ -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