- I am trying to figure what is currently stored in registers %l0 and %l1. However what aludes is
"mov 0x18,%l0 "
- I do not understand what this command does. I have read what flags are, they are used for setting, clearing and toggling. Also what is 0x18 is this multiplication? I understand what the add command does but I am unsure of what is stored in %l1.
This is what I currently have based on my interpretation.
%l0: 0
%l1: 0
Any advice on how this code works would be most appreciated.
.global main
main:
save %sp,-96,%sp
clr %l0
clr %l1
mov 0x18,%l0
btst 0x18,%l0
be clear
nop
set:
add %l1,2,%l1 !inc l1 by 2
clear:
add %l1,1,%l1 !Inc l1 by 1
mov 1, %g1 !Exit
ta 0
