Skip to content

Commit 36ac597

Browse files
committed
Allow usage of pseudo instruction ldr with .equ
1 parent 5abaf21 commit 36ac597

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/projetarm_v2/simulator/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void main(String[] args) {
2121
"kek: .asciz \"test\";" +
2222
".align;" +
2323
"start: ldr r0,=kek;" +
24-
"mov r1,#0xFF04;" +
24+
"ldr r1,=0x1F0008;" +
2525
"blx r1");
2626

2727
simulator.run();

src/projetarm_v2/simulator/core/Preprocessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static String pass1(String assembly) {
2525

2626
while (matcher.find()) {
2727
assembly = assembly.replaceAll("#"+ matcher.group(1), "#"+matcher.group(2));
28+
assembly = assembly.replaceAll("="+ matcher.group(1), "="+matcher.group(2));
2829
}
2930

3031
assembly = assembly

0 commit comments

Comments
 (0)