Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kogepanh committed Jun 30, 2021
1 parent 51f6c0c commit 6483628
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*.mb
*.o
*.out
*.s
# *.s

##############
# Mac
Expand Down
16 changes: 16 additions & 0 deletions src/Ex3-1.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.arm
.text

mov r1, #0x04000000
ldr r2, =0x0F03
strh r2, [ r1 ]

mov r3, #0x06000000
ldr r4, =0x7FFF
strh r4, [ r3 ]
strh r4, [ r3, #4 ]
strh r4, [ r3, #8 ]
strh r4, [ r3, #12]

hogehoge2:
b hogehoge2
16 changes: 16 additions & 0 deletions src/Ex3-2-1.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.arm
.text

mov r1, #0x04000000
ldr r2, =0x0F03
strh r2, [ r1 ]

mov r3, #0x06000000
ldr r4, =0x7FE0
strh r4, [ r3 ]
strh r4, [ r3, #4 ]
strh r4, [ r3, #8 ]
strh r4, [ r3, #12]

hogehoge2:
b hogehoge2
16 changes: 16 additions & 0 deletions src/Ex3-2-2.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.arm
.text

mov r1, #0x04000000
ldr r2, =0x0F03
strh r2, [ r1 ]

ldr r3, =0x06012BF2
ldr r4, =0x7FFF
strh r4, [ r3 ]
strh r4, [ r3, #4 ]
strh r4, [ r3, #8 ]
strh r4, [ r3, #12]

hogehoge2:
b hogehoge2
30 changes: 30 additions & 0 deletions src/Ex4-1.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.arm
.text

mov r1, #0x04000000
ldr r2, =0x0F03
strh r2, [ r1 ]

hogehoge3:
ldr r8, =0x04000130
ldrh r9, [ r8 ]
ldr r10, =0x0001
and r11, r10, r9
cmp r11, r10
bne hogehoge4
mov r3, #0x06000000
ldr r4, =0x001F
strh r4, [ r3 ]
strh r4, [ r3, #4 ]
strh r4, [ r3, #8 ]
strh r4, [ r3, #12 ]
b hogehoge3

hogehoge4:
mov r3, #0x06000000
ldr r4, =0x7C00
strh r4, [ r3 ]
strh r4, [ r3, #4 ]
strh r4, [ r3, #8 ]
strh r4, [ r3, #12 ]
b hogehoge3

0 comments on commit 6483628

Please sign in to comment.