├── .gitignore ├── logo.png ├── examples ├── getRandomNumberInR0.S ├── breakpointExample.S ├── incrementR2EachSecond.S ├── allEightSegmentsDisplaysAt6.S ├── cas3.S ├── angel_swi_syscalls │ ├── remove.S │ ├── system.S │ ├── open.S │ ├── openAndClose.s │ └── rename.S ├── blinkThreeLeds.S ├── cas2.S ├── cas4.S ├── test8seg.S ├── cas1.S ├── SimpleExemple.S └── routines.md ├── vendor ├── dockfx │ └── dockfx │ │ ├── maven-metadata.xml.md5 │ │ ├── maven-metadata.xml.sha1 │ │ ├── 0.5.1-valentin │ │ ├── dockfx-0.5.1-valentin.jar.md5 │ │ ├── dockfx-0.5.1-valentin.pom.md5 │ │ ├── dockfx-0.5.1-valentin.jar.sha1 │ │ ├── dockfx-0.5.1-valentin.pom.sha1 │ │ ├── dockfx-0.5.1-valentin.jar │ │ └── dockfx-0.5.1-valentin.pom │ │ └── maven-metadata.xml └── unicorn │ └── unicorn │ ├── maven-metadata.xml.md5 │ ├── maven-metadata.xml.sha1 │ ├── 1.0-armstrong │ ├── unicorn-1.0-armstrong.jar.md5 │ ├── unicorn-1.0-armstrong.pom.md5 │ ├── unicorn-1.0-armstrong.jar.sha1 │ ├── unicorn-1.0-armstrong.pom.sha1 │ ├── unicorn-1.0-armstrong.jar │ └── unicorn-1.0-armstrong.pom │ └── maven-metadata.xml ├── small_logo.png ├── images ├── Classes.png ├── cli_s1.png ├── cli_s2.png ├── gui_s1.png ├── gui_s2.png └── Interpretor.png ├── src ├── resources │ ├── run.png │ ├── cancel.png │ ├── ledOff.png │ ├── ledOn.png │ ├── logo.png │ ├── mleft.png │ ├── prompt.png │ ├── reload.png │ ├── save.png │ ├── stop.png │ ├── switch.png │ ├── leverOff.png │ ├── leverOn.png │ ├── warning.png │ ├── runByStep.png │ ├── pushingButton.png │ ├── 8_segment │ │ ├── 8seg_1.png │ │ ├── 8seg_2.png │ │ ├── 8seg_3.png │ │ ├── 8seg_4.png │ │ ├── 8seg_5.png │ │ ├── 8seg_6.png │ │ ├── 8seg_7.png │ │ ├── 8seg_8.png │ │ └── 8seg_base.png │ ├── Anonymous_Pro_B.ttf │ ├── detachedWindow.png │ ├── EditorView.fxml │ ├── ConsoleView.fxml │ ├── 26025.svg │ ├── aboutView.fxml │ ├── warning.fxml │ ├── simpleMemoryView.fxml │ ├── style.css │ ├── MemoryView.fxml │ └── preferences.fxml ├── natives │ ├── kstool-amd64 │ ├── kstool-x86.exe │ ├── kstool-amd64.exe │ ├── libunicorn_java-amd64.so │ ├── libunicorn_java-x86.dll │ └── libunicorn_java-amd64.dll └── projetarm_v2 │ ├── simulator │ ├── core │ │ ├── syscalls │ │ │ ├── io │ │ │ │ ├── OpenedFile.java │ │ │ │ ├── FileDescriptors.java │ │ │ │ ├── SVCIOCall.java │ │ │ │ ├── FileMode.java │ │ │ │ ├── SVCCallClose.java │ │ │ │ └── SVCCallOpen.java │ │ │ ├── SVCCallTest.java │ │ │ ├── SVCCallTime.java │ │ │ ├── SVCLinuxHandler.java │ │ │ ├── SVCCallSystem.java │ │ │ ├── SVCCallRemove.java │ │ │ ├── SVCCallRename.java │ │ │ ├── SVCCall.java │ │ │ └── SVCHandler.java │ │ ├── io │ │ │ ├── IOLed.java │ │ │ ├── IOSegment.java │ │ │ ├── IOSwitch.java │ │ │ ├── IO8Segment.java │ │ │ ├── IOButton.java │ │ │ ├── IOComponent.java │ │ │ ├── PORTManager.java │ │ │ └── IOx.java │ │ ├── InvalidAssemblyException.java │ │ ├── routines │ │ │ ├── CpuBreakpoint.java │ │ │ ├── CpuConsolePutChar.java │ │ │ ├── CpuSleep.java │ │ │ ├── CpuRandom.java │ │ │ ├── CpuConsolePutString.java │ │ │ ├── CpuConsoleClear.java │ │ │ ├── CpuPutFile.java │ │ │ ├── CpuGetFile.java │ │ │ ├── CpuConsoleGetChar.java │ │ │ ├── CpuConsoleGetString.java │ │ │ └── CpuRoutine.java │ │ ├── SimpleRegister.java │ │ ├── Register.java │ │ ├── UnicornRegister.java │ │ ├── RamRegister.java │ │ ├── RamChunk.java │ │ ├── save │ │ │ ├── InterfaceAdapterArrayList.java │ │ │ └── Save.java │ │ ├── Assembler.java │ │ ├── Preprocessor.java │ │ ├── Ram.java │ │ ├── Cpsr.java │ │ └── Cpu.java │ ├── ui │ │ ├── javafx │ │ │ ├── FormatException.java │ │ │ ├── ramview │ │ │ │ ├── OutputType.java │ │ │ │ ├── ShowType.java │ │ │ │ ├── RamObservableListAdapter.java │ │ │ │ └── NewLineRam.java │ │ │ ├── RegisterObjectView.java │ │ │ ├── EightSegmentDisplay.java │ │ │ ├── Preferences.java │ │ │ ├── ArmToolBar.java │ │ │ ├── ConsoleView.java │ │ │ ├── Interpreter.java │ │ │ ├── CodeEditor.java │ │ │ ├── ArmMenuBar.java │ │ │ └── LedView.java │ │ └── cli │ │ │ └── Cli.java │ ├── boilerplate │ │ └── InvalidInstructionException.java │ ├── utils │ │ ├── OSValidator.java │ │ └── NativeJarGetter.java │ └── Main.java │ └── gpl │ ├── TableCellSkinFixed.java │ └── TextFieldTableCellFixed.java ├── .settings ├── org.eclipse.m2e.core.prefs └── org.eclipse.jdt.core.prefs ├── .project ├── .idea └── compiler.xml ├── README.md ├── .classpath ├── tests └── tests │ └── projetarm_v2 │ └── simulator │ └── core │ └── CpsrTdd.java └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /target/ 3 | /.idea/ -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/logo.png -------------------------------------------------------------------------------- /examples/getRandomNumberInR0.S: -------------------------------------------------------------------------------- 1 | ldr r1,=0x1F0014 2 | mov r0,#0 3 | 4 | blx r1 -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/maven-metadata.xml.md5: -------------------------------------------------------------------------------- 1 | 0f80d06600d24d0caa66c8282504b305 -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/maven-metadata.xml.md5: -------------------------------------------------------------------------------- 1 | adf9121ef653406c3c3d8b6ec71037eb -------------------------------------------------------------------------------- /small_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/small_logo.png -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/maven-metadata.xml.sha1: -------------------------------------------------------------------------------- 1 | eee1f8b532be5b2ed4216e4ab79e5962fb03d4d4 -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/maven-metadata.xml.sha1: -------------------------------------------------------------------------------- 1 | cfc1455bd532679d9fd46571b1749db0cdbc9de3 -------------------------------------------------------------------------------- /images/Classes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/images/Classes.png -------------------------------------------------------------------------------- /images/cli_s1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/images/cli_s1.png -------------------------------------------------------------------------------- /images/cli_s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/images/cli_s2.png -------------------------------------------------------------------------------- /images/gui_s1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/images/gui_s1.png -------------------------------------------------------------------------------- /images/gui_s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/images/gui_s2.png -------------------------------------------------------------------------------- /src/resources/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/run.png -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/0.5.1-valentin/dockfx-0.5.1-valentin.jar.md5: -------------------------------------------------------------------------------- 1 | 69275f2847401f681a26d266aa582c41 -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/0.5.1-valentin/dockfx-0.5.1-valentin.pom.md5: -------------------------------------------------------------------------------- 1 | 4985bfd38614707382e9e73eff0cbac8 -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/1.0-armstrong/unicorn-1.0-armstrong.jar.md5: -------------------------------------------------------------------------------- 1 | 1ecc8508e76797f84db104295af4be0b -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/1.0-armstrong/unicorn-1.0-armstrong.pom.md5: -------------------------------------------------------------------------------- 1 | ee741b81344dc468a4421c6f8e675fee -------------------------------------------------------------------------------- /images/Interpretor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/images/Interpretor.png -------------------------------------------------------------------------------- /src/natives/kstool-amd64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/natives/kstool-amd64 -------------------------------------------------------------------------------- /src/resources/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/cancel.png -------------------------------------------------------------------------------- /src/resources/ledOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/ledOff.png -------------------------------------------------------------------------------- /src/resources/ledOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/ledOn.png -------------------------------------------------------------------------------- /src/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/logo.png -------------------------------------------------------------------------------- /src/resources/mleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/mleft.png -------------------------------------------------------------------------------- /src/resources/prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/prompt.png -------------------------------------------------------------------------------- /src/resources/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/reload.png -------------------------------------------------------------------------------- /src/resources/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/save.png -------------------------------------------------------------------------------- /src/resources/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/stop.png -------------------------------------------------------------------------------- /src/resources/switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/switch.png -------------------------------------------------------------------------------- /examples/breakpointExample.S: -------------------------------------------------------------------------------- 1 | ldr r1,=0x1F0018 2 | mov r0,#0 3 | 4 | kek: add r0,r0,#1 5 | blx r1 6 | b kek -------------------------------------------------------------------------------- /src/natives/kstool-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/natives/kstool-x86.exe -------------------------------------------------------------------------------- /src/resources/leverOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/leverOff.png -------------------------------------------------------------------------------- /src/resources/leverOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/leverOn.png -------------------------------------------------------------------------------- /src/resources/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/warning.png -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/0.5.1-valentin/dockfx-0.5.1-valentin.jar.sha1: -------------------------------------------------------------------------------- 1 | 12ed0f0e235a759998d63c0eae329986d7509d4d -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/0.5.1-valentin/dockfx-0.5.1-valentin.pom.sha1: -------------------------------------------------------------------------------- 1 | 557abecdee0806f59414c569e78990903ff4d248 -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/1.0-armstrong/unicorn-1.0-armstrong.jar.sha1: -------------------------------------------------------------------------------- 1 | 36681a20988033982d486abbb3175cc616b0dbd6 -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/1.0-armstrong/unicorn-1.0-armstrong.pom.sha1: -------------------------------------------------------------------------------- 1 | d38a71fe5ed7bedc8b80d6d65e83bcb5710f939f -------------------------------------------------------------------------------- /src/natives/kstool-amd64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/natives/kstool-amd64.exe -------------------------------------------------------------------------------- /src/resources/runByStep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/runByStep.png -------------------------------------------------------------------------------- /src/resources/pushingButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/pushingButton.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_1.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_2.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_3.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_4.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_5.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_6.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_7.png -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_8.png -------------------------------------------------------------------------------- /src/resources/Anonymous_Pro_B.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/Anonymous_Pro_B.ttf -------------------------------------------------------------------------------- /src/resources/detachedWindow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/detachedWindow.png -------------------------------------------------------------------------------- /examples/incrementR2EachSecond.S: -------------------------------------------------------------------------------- 1 | ldr r1,=0x1F0010 2 | mov r0,#1000 3 | mov r2,#0 4 | 5 | kek: add r2,r2,#1 6 | blx r1 7 | b kek -------------------------------------------------------------------------------- /src/natives/libunicorn_java-amd64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/natives/libunicorn_java-amd64.so -------------------------------------------------------------------------------- /src/natives/libunicorn_java-x86.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/natives/libunicorn_java-x86.dll -------------------------------------------------------------------------------- /src/natives/libunicorn_java-amd64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/natives/libunicorn_java-amd64.dll -------------------------------------------------------------------------------- /src/resources/8_segment/8seg_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/src/resources/8_segment/8seg_base.png -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /examples/allEightSegmentsDisplaysAt6.S: -------------------------------------------------------------------------------- 1 | ldr r0,=0x1f1000 2 | mov r2,#0x7D 3 | mov r1,#0 4 | 5 | kek: str r2,[r0,r1] 6 | 7 | add r1,r1,#1 8 | cmp r1,#15 9 | 10 | bne kek -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/0.5.1-valentin/dockfx-0.5.1-valentin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/vendor/dockfx/dockfx/0.5.1-valentin/dockfx-0.5.1-valentin.jar -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/1.0-armstrong/unicorn-1.0-armstrong.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linouxis9/ARMStrong/HEAD/vendor/unicorn/unicorn/1.0-armstrong/unicorn-1.0-armstrong.jar -------------------------------------------------------------------------------- /examples/cas3.S: -------------------------------------------------------------------------------- 1 | ldr r0,=kek @ File path 2 | mov r1,#0x3000 @ Where to write File bytes 3 | ldr r2,=0x1F0020 @ Open file routine's address 4 | blx r2 @ Calls routine 5 | kek: .asciz "C:\\kek.txt" -------------------------------------------------------------------------------- /examples/angel_swi_syscalls/remove.S: -------------------------------------------------------------------------------- 1 | ldr r1,=struct 2 | ldr r2,=string 3 | str r2,[r1] 4 | svc #0x0e 5 | 6 | .stop 7 | 8 | struct:.word 0 9 | length:.word 7 10 | string:.asciz "/tmp/sb" 11 | -------------------------------------------------------------------------------- /examples/angel_swi_syscalls/system.S: -------------------------------------------------------------------------------- 1 | ldr r1,=struct 2 | ldr r2,=string 3 | str r2,[r1] 4 | svc #0x12 5 | 6 | .stop 7 | 8 | struct:.word 0 9 | length:.word 13 10 | string:.asciz "mkdir /tmp/sa" 11 | -------------------------------------------------------------------------------- /examples/angel_swi_syscalls/open.S: -------------------------------------------------------------------------------- 1 | ldr r1,=struct 2 | ldr r2,=string 3 | str r2,[r1] 4 | svc #0x01 5 | 6 | .stop 7 | 8 | struct:.word 0 9 | .word 5 10 | length:.word 7 11 | string:.asciz "/tmp/sb" 12 | 13 | -------------------------------------------------------------------------------- /examples/blinkThreeLeds.S: -------------------------------------------------------------------------------- 1 | mov r0,#100 2 | ldr r1,=0x1F0010 3 | ldr r4,=0x1F1000 4 | 5 | 6 | deb: 7 | mov r5,0b101 8 | str r5,[r4] 9 | 10 | blx r1 11 | 12 | mov r5,0b010 13 | str r5,[r4] 14 | 15 | blx r1 16 | 17 | b deb 18 | -------------------------------------------------------------------------------- /examples/cas2.S: -------------------------------------------------------------------------------- 1 | mov r0,0x3000 @ Address to save / print string 2 | ldr r1,=0x1F000C @ Routine to get String out of the GUI console 3 | blx r1 @ Calls routine 4 | ldr r1,=0x1F0008 @ Routine to print string in RAM 5 | blx r1 @ Calls routine -------------------------------------------------------------------------------- /examples/cas4.S: -------------------------------------------------------------------------------- 1 | ldr r0,=kek @ File path (\0 terminated) 2 | ldr r1,=content @ Address of content to write (\0 terminated) 3 | ldr r2,=0x1F001C @ Write file routine's address 4 | blx r2 @ Jump to routine 5 | kek: .asciz "C:\\tmp\\kek.txt" 6 | content: .asciz "salut toi!" -------------------------------------------------------------------------------- /examples/angel_swi_syscalls/openAndClose.s: -------------------------------------------------------------------------------- 1 | ldr r1,=struct 2 | ldr r2,=string 3 | str r2,[r1] 4 | svc #0x01 5 | 6 | mov r1,#0x3000 7 | str r0,[r1] 8 | svc #0x02 9 | 10 | .stop 11 | 12 | struct:.word 0 13 | .word 5 14 | length:.word 7 15 | string:.asciz "/tmp/sb" 16 | 17 | -------------------------------------------------------------------------------- /examples/test8seg.S: -------------------------------------------------------------------------------- 1 | mov r0,#25 2 | ldr r1,=0x1F0010 3 | ldr r4,=0x1F1000 4 | mov r6,#-1 5 | 6 | if:mov r5,0x80 7 | add r6,r6,#1 8 | deb:strb r5,[r4,r6] 9 | 10 | blx r1 11 | 12 | mov r5,r5, LSR #1 13 | cmp r5,#0x0 14 | beq if 15 | 16 | blx r1 17 | 18 | cmp r6,#15 19 | 20 | bne deb 21 | -------------------------------------------------------------------------------- /examples/cas1.S: -------------------------------------------------------------------------------- 1 | b start @ Branch to start label 2 | kek: .asciz "test" 3 | .align @ Align memory as the string string "test\0" isn't a multiple of 4 4 | start: ldr r0,=kek @ Program entrypoint, load the string address inside the r0 register 5 | ldr r1,=0x1F0008 @ Load routine address to show a string in register r1 6 | blx r1 @ Calls routine -------------------------------------------------------------------------------- /examples/angel_swi_syscalls/rename.S: -------------------------------------------------------------------------------- 1 | ldr r1,=newAddress 2 | ldr r2,=newName 3 | str r2,[r1] 4 | 5 | ldr r1,=oldAddress 6 | ldr r2,=oldName 7 | str r2,[r1] 8 | 9 | svc #0xf 10 | 11 | .stop 12 | 13 | struct: 14 | oldAddress:.word 0 15 | oldLength:.word 7 16 | newAddress:.word 0 17 | newLength:.word 7 18 | oldName:.asciz "/tmp/sa" 19 | newName:.asciz "/tmp/sb" 20 | 21 | 22 | -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/maven-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | unicorn 4 | unicorn 5 | 6 | 1.0-armstrong 7 | 8 | 1.0-armstrong 9 | 10 | 20190106181302 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/maven-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | dockfx 4 | dockfx 5 | 6 | 0.5.1-valentin 7 | 8 | 0.5-armstrong 9 | 0.5.1-valentin 10 | 11 | 20190109191818 12 | 13 | 14 | -------------------------------------------------------------------------------- /vendor/dockfx/dockfx/0.5.1-valentin/dockfx-0.5.1-valentin.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | dockfx 6 | dockfx 7 | 0.5.1-valentin 8 | 9 | -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/core/syscalls/io/OpenedFile.java: -------------------------------------------------------------------------------- 1 | package projetarm_v2.simulator.core.syscalls.io; 2 | 3 | import java.io.File; 4 | 5 | public class OpenedFile { 6 | private File file; 7 | private FileMode mode; 8 | 9 | public OpenedFile(File file, FileMode mode) { 10 | this.file = file; 11 | this.mode = mode; 12 | } 13 | 14 | public File getFile() { 15 | return file; 16 | } 17 | 18 | public FileMode getMode() { 19 | return mode; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/unicorn/unicorn/1.0-armstrong/unicorn-1.0-armstrong.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | unicorn 6 | unicorn 7 | 1.0-armstrong 8 | 9 | -------------------------------------------------------------------------------- /examples/SimpleExemple.S: -------------------------------------------------------------------------------- 1 | @ Comparaison et branchement 2 | 3 | cmp r4, r5 4 | beq conditionvraie @ tester les codes eq, ne, ge, gt, le et lt 5 | @ et essayer de déterminer leur signification 6 | b conditionfausse 7 | 8 | conditionvraie: @ la condition est vraie 9 | ldr r0, =chaine1 10 | ldr r1, =0x1F0008 11 | blx r1 12 | b fin 13 | conditionfausse: @ la condition est fausse 14 | ldr r0, =chaine2 15 | ldr r1, =0x1F0008 16 | blx r1 17 | 18 | fin: 19 | .stop 20 | 21 | @ Données 22 | chaine1: .asciz "La condition est vraie" 23 | chaine2: .asciz "La condition est fausse !" -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/ui/javafx/FormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019 Valentin D'Emmanuele, Gilles Mertens, Dylan Fraisse, Hugo Chemarin, Nicolas Gervasi 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | */ 8 | 9 | package projetarm_v2.simulator.ui.javafx; 10 | 11 | /** 12 | * thrown when the representation of numbers typed by user is not recognized 13 | */ 14 | public class FormatException extends RuntimeException { 15 | } 16 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | projetarm_v2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/core/io/IOLed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019 Valentin D'Emmanuele, Gilles Mertens, Dylan Fraisse, Hugo Chemarin, Nicolas Gervasi 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | */ 8 | 9 | package projetarm_v2.simulator.core.io; 10 | 11 | import projetarm_v2.simulator.core.RamRegister; 12 | 13 | public class IOLed extends IOComponent { 14 | 15 | public IOLed(RamRegister register, int shift, int portNb) { 16 | super(register, shift, portNb); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/core/io/IOSegment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019 Valentin D'Emmanuele, Gilles Mertens, Dylan Fraisse, Hugo Chemarin, Nicolas Gervasi 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | */ 8 | 9 | package projetarm_v2.simulator.core.io; 10 | 11 | import projetarm_v2.simulator.core.RamRegister; 12 | 13 | public class IOSegment extends IOComponent { 14 | 15 | protected IOSegment(RamRegister port, int shift, int portNb) { 16 | super(port, shift, portNb); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/core/InvalidAssemblyException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019 Valentin D'Emmanuele, Gilles Mertens, Dylan Fraisse, Hugo Chemarin, Nicolas Gervasi 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | */ 8 | 9 | package projetarm_v2.simulator.core; 10 | 11 | public class InvalidAssemblyException extends RuntimeException { 12 | 13 | private static final long serialVersionUID = -751189391151339140L; 14 | 15 | public InvalidAssemblyException(String message) { 16 | super(message); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /examples/routines.md: -------------------------------------------------------------------------------- 1 | CpuConsolePutChar 0x1F0000 2 | - r0 @ ASCII 3 | - r0 -> stdout 4 | 5 | CpuConsoleGetChar 0x1F0004 6 | - r0 @ ASCII 7 | - 1 char consoleBuffer -> r0 8 | 9 | CpuConsolePutString 0x1F0008 10 | - r0 -> Pointer to a null-terminated string 11 | - *r0 -> stdout 12 | 13 | CpuConsoleGetString 0x1F000C 14 | - r0 @ Pointer to a buffer 15 | - whole consoleBuffer -> *r0 16 | 17 | CpuSleep 0x1F0010 18 | - r0 @ Wait in ms 19 | - sleep(r0) 20 | 21 | CpuRandom 0x1F0014 22 | - Random 32 bits integer -> r0 23 | 24 | CpuBreakpoint 0x1F0018 25 | - Halt execution 26 | 27 | CpuPutFile 0x10001C 28 | - r0 @ File path 29 | - r1 @ Where to read content 30 | 31 | CpuGetFile 0x1F0020 32 | - r0 @ File path 33 | - r1 @ Where to save content -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/core/io/IOSwitch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019 Valentin D'Emmanuele, Gilles Mertens, Dylan Fraisse, Hugo Chemarin, Nicolas Gervasi 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | */ 8 | 9 | package projetarm_v2.simulator.core.io; 10 | 11 | import projetarm_v2.simulator.core.RamRegister; 12 | 13 | public class IOSwitch extends IOComponent { 14 | 15 | protected IOSwitch(RamRegister port, int shift, int portNb) { 16 | super(port, shift, portNb); 17 | } 18 | 19 | public boolean flip() { 20 | this.set(!this.isOn()); 21 | return this.isOn(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ![#@armsim](small_logo.png) 2 | ## A fast and simple ARM Simulator made for education 3 | 4 | ## Installation 5 | 6 | Download the [latest project-armstrong.jar](https://github.com/linouxis9/ARMStrong/releases/latest) and enjoy! 7 | 8 | ## Graphical User Interface 9 | ![gui_s1](images/gui_s1.png) 10 | ![gui_s2](images/gui_s2.png) 11 | ```bash 12 | java -jar project-armstrong.jar 13 | ``` 14 | 15 | ## Command-line Interface 16 | ![cli_s1](images/cli_s1.png) 17 | ![cli_s2](images/cli_s2.png) 18 | ``` 19 | java -jar project-armstrong.jar cli 20 | ``` 21 | 22 | ## Information 23 | 24 | ### Requirements 25 | - Java 11 26 | - Windows x86/x64 or Linux x64 27 | 28 | ### Libraries used 29 | - Unicorn 30 | - Keystone 31 | - JavaFX 32 | - DockFX 33 | 34 | > Made with :heart: by the #@RMStrong Team 35 | -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/core/syscalls/SVCCallTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019 Valentin D'Emmanuele, Gilles Mertens, Dylan Fraisse, Hugo Chemarin, Nicolas Gervasi 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | */ 8 | 9 | package projetarm_v2.simulator.core.syscalls; 10 | 11 | import projetarm_v2.simulator.core.Cpu; 12 | 13 | public class SVCCallTest extends SVCCall { 14 | 15 | public SVCCallTest(Cpu cpu) { 16 | super(cpu); 17 | } 18 | 19 | @Override 20 | protected int getSvcNumber() { 21 | return 25; 22 | } 23 | 24 | @Override 25 | protected void primitive() { 26 | System.out.println("First syscall o/"); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=11 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=11 15 | -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/boilerplate/InvalidInstructionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019 Valentin D'Emmanuele, Gilles Mertens, Dylan Fraisse, Hugo Chemarin, Nicolas Gervasi 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | */ 8 | 9 | package projetarm_v2.simulator.boilerplate; 10 | 11 | public class InvalidInstructionException extends RuntimeException { 12 | 13 | private static final long serialVersionUID = 5458289081653091341L; 14 | private final int line; 15 | 16 | public InvalidInstructionException(String message, int line) { 17 | super(message); 18 | this.line = line; 19 | } 20 | 21 | public int getLine() { 22 | return line; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/projetarm_v2/simulator/core/syscalls/io/FileDescriptors.java: -------------------------------------------------------------------------------- 1 | package projetarm_v2.simulator.core.syscalls.io; 2 | 3 | import java.util.Map; 4 | import java.util.concurrent.ConcurrentHashMap; 5 | import java.util.concurrent.atomic.AtomicInteger; 6 | 7 | public class FileDescriptors { 8 | private Map map; 9 | private AtomicInteger newId; 10 | 11 | 12 | public FileDescriptors() { 13 | this.map = new ConcurrentHashMap<>(); 14 | this.newId = new AtomicInteger(3); 15 | } 16 | 17 | public OpenedFile getFileDescriptor(int no) { 18 | return this.map.get(no); 19 | } 20 | 21 | public int addNewFile(OpenedFile file) { 22 | int id = this.newId.getAndIncrement(); 23 | this.map.put(id, file); 24 | return id; 25 | } 26 | 27 | public boolean closeFile(int fd) { 28 | return this.map.remove(fd) != null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/resources/EditorView.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 |