Add print string from memory interrupt
This commit is contained in:
@@ -15,7 +15,7 @@ addi $1 %A %A;
|
||||
# Print the current value
|
||||
int $1;
|
||||
seti %B %A;
|
||||
seti %A $10; # new line
|
||||
seti %A $32; # space
|
||||
int $0;
|
||||
seti %A %B;
|
||||
|
||||
@@ -68,3 +68,19 @@ int $0;
|
||||
|
||||
seti %A [$1024];
|
||||
int $1;
|
||||
|
||||
# Push the string "hell" into register A
|
||||
seti %A $108;
|
||||
shli %A $8 %A;
|
||||
addi %A $108 %A;
|
||||
shli %A $8 %A;
|
||||
addi %A $101 %A;
|
||||
shli %A $8 %A;
|
||||
addi %A $104 %A;
|
||||
|
||||
# Store A at 900
|
||||
seti [$900] %A;
|
||||
# Setup to print a string from position 900
|
||||
seti %A $900;
|
||||
seti %B $4;
|
||||
int $2;
|
||||
Reference in New Issue
Block a user