From 174f5d4e170bf339aa4108c6aeb399ad1fba7bfb Mon Sep 17 00:00:00 2001 From: LailaTheElf Date: Fri, 5 Sep 2025 16:03:05 +0200 Subject: [PATCH] w1.1: decode listing 1 --- lab1.1/listing1 | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/lab1.1/listing1 b/lab1.1/listing1 index 4312ca6..b4299a6 100644 --- a/lab1.1/listing1 +++ b/lab1.1/listing1 @@ -1,3 +1,36 @@ paste folowing code in first address for lazy typers: -2008d4908d6008d2055d0600d4907d6008d20004906d6008d230dfd031dbd4da05d3da01dd1fdd40586008de7f9d3830d4002d0dc00d4002d0dc14d40025854d0014 +2008490860082055060049076008200049066008230f031b4a053a01d1fd40586008e7f9383040020c0040020c14400258540014 + +0x20000000: 2008 +0x20000002: 4908 +0x20000004: 6008 +0x20000006: 2055 +0x20000008: 0600 +0x2000000A: 4907 +0x2000000C: 6008 +0x2000000E: 2000 -> MOVS.N R0, #0 // set R0 to value 0 +0x20000010: 4906 -> LDR.N R1, [PC, #24] // load PC + 24 (address 0x2000002c) into R1 +0x20000012: 6008 -> STR.N R0, [R1, #0] // store address from R1 into R0 +0x20000014: 230f -> MOVS.N R3, #15 // set R3 to value 15 +0x20000016: 031b -> LSRS.N R3, R3, #12 +loop +0x20000018: 4a05 -> LDR.N R2, [PC, #20] // load PC + 20 (address 0x20000030 ) into R2 +wait +0x2000001A: 3a01 -> SUBS.N R2, #1 +0x2000001C: d1fd -> BNE.N [PC, #-2] // jump to wait if zero flag +0x2000001E: 4058 -> EORS.N R0, R0, R3 +0x20000020: 6008 -> STR.N R0, [R1, #0] +0x20000022: e7f9 -> B.N [PC, #-10] // jump to loop +.word +0x20000024: 3830 +0x20000026: 4002 +.word +0x20000028: 0c00 +0x2000002A: 4002 +.word +0x2000002C: 0c14 +0x2000002E: 4002 +.word delay +0x20000030: 5854 +0x20000032: 0014