diff options
Diffstat (limited to 'src/data/simulating_memory')
| -rw-r--r-- | src/data/simulating_memory/listing_0051_memory_mov | bin | 48 -> 0 bytes | |||
| -rw-r--r-- | src/data/simulating_memory/listing_0051_memory_mov.asm | 30 | ||||
| -rw-r--r-- | src/data/simulating_memory/listing_0051_memory_mov.txt | 19 | ||||
| -rw-r--r-- | src/data/simulating_memory/listing_0052_memory_add_loop | bin | 35 -> 0 bytes | |||
| -rw-r--r-- | src/data/simulating_memory/listing_0052_memory_add_loop.asm | 36 | ||||
| -rw-r--r-- | src/data/simulating_memory/listing_0052_memory_add_loop.txt | 43 | ||||
| -rw-r--r-- | src/data/simulating_memory/listing_0053_add_loop_challenge | bin | 33 -> 0 bytes | |||
| -rw-r--r-- | src/data/simulating_memory/listing_0053_add_loop_challenge.asm | 35 | ||||
| -rw-r--r-- | src/data/simulating_memory/listing_0053_add_loop_challenge.txt | 36 |
9 files changed, 0 insertions, 199 deletions
diff --git a/src/data/simulating_memory/listing_0051_memory_mov b/src/data/simulating_memory/listing_0051_memory_mov Binary files differdeleted file mode 100644 index 6907cff..0000000 --- a/src/data/simulating_memory/listing_0051_memory_mov +++ /dev/null diff --git a/src/data/simulating_memory/listing_0051_memory_mov.asm b/src/data/simulating_memory/listing_0051_memory_mov.asm deleted file mode 100644 index d27e348..0000000 --- a/src/data/simulating_memory/listing_0051_memory_mov.asm +++ /dev/null @@ -1,30 +0,0 @@ -; ======================================================================== -; -; (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved. -; -; This software is provided 'as-is', without any express or implied -; warranty. In no event will the authors be held liable for any damages -; arising from the use of this software. -; -; Please see https://computerenhance.com for further information -; -; ======================================================================== - -; ======================================================================== -; LISTING 51 -; ======================================================================== - -bits 16 - -mov word [1000], 1 -mov word [1002], 2 -mov word [1004], 3 -mov word [1006], 4 - -mov bx, 1000 -mov word [bx + 4], 10 - -mov bx, word [1000] -mov cx, word [1002] -mov dx, word [1004] -mov bp, word [1006] diff --git a/src/data/simulating_memory/listing_0051_memory_mov.txt b/src/data/simulating_memory/listing_0051_memory_mov.txt deleted file mode 100644 index e1ce4b0..0000000 --- a/src/data/simulating_memory/listing_0051_memory_mov.txt +++ /dev/null @@ -1,19 +0,0 @@ ---- test\listing_0051_memory_mov execution --- -mov word [+1000], 1 ; ip:0x0->0x6 -mov word [+1002], 2 ; ip:0x6->0xc -mov word [+1004], 3 ; ip:0xc->0x12 -mov word [+1006], 4 ; ip:0x12->0x18 -mov bx, 1000 ; bx:0x0->0x3e8 ip:0x18->0x1b -mov word [bx+4], 10 ; ip:0x1b->0x20 -mov bx, [+1000] ; bx:0x3e8->0x1 ip:0x20->0x24 -mov cx, [+1002] ; cx:0x0->0x2 ip:0x24->0x28 -mov dx, [+1004] ; dx:0x0->0xa ip:0x28->0x2c -mov bp, [+1006] ; bp:0x0->0x4 ip:0x2c->0x30 - -Final registers: - bx: 0x0001 (1) - cx: 0x0002 (2) - dx: 0x000a (10) - bp: 0x0004 (4) - ip: 0x0030 (48) - diff --git a/src/data/simulating_memory/listing_0052_memory_add_loop b/src/data/simulating_memory/listing_0052_memory_add_loop Binary files differdeleted file mode 100644 index 1f6d274..0000000 --- a/src/data/simulating_memory/listing_0052_memory_add_loop +++ /dev/null diff --git a/src/data/simulating_memory/listing_0052_memory_add_loop.asm b/src/data/simulating_memory/listing_0052_memory_add_loop.asm deleted file mode 100644 index 189ed32..0000000 --- a/src/data/simulating_memory/listing_0052_memory_add_loop.asm +++ /dev/null @@ -1,36 +0,0 @@ -; ======================================================================== -; -; (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved. -; -; This software is provided 'as-is', without any express or implied -; warranty. In no event will the authors be held liable for any damages -; arising from the use of this software. -; -; Please see https://computerenhance.com for further information -; -; ======================================================================== - -; ======================================================================== -; LISTING 52 -; ======================================================================== - -bits 16 - -mov dx, 6 -mov bp, 1000 - -mov si, 0 -init_loop_start: - mov word [bp + si], si - add si, 2 - cmp si, dx - jnz init_loop_start - -mov bx, 0 -mov si, 0 -add_loop_start: - mov cx, word [bp + si] - add bx, cx - add si, 2 - cmp si, dx - jnz add_loop_start diff --git a/src/data/simulating_memory/listing_0052_memory_add_loop.txt b/src/data/simulating_memory/listing_0052_memory_add_loop.txt deleted file mode 100644 index 14da357..0000000 --- a/src/data/simulating_memory/listing_0052_memory_add_loop.txt +++ /dev/null @@ -1,43 +0,0 @@ ---- test\listing_0052_memory_add_loop execution --- -mov dx, 6 ; dx:0x0->0x6 ip:0x0->0x3 -mov bp, 1000 ; bp:0x0->0x3e8 ip:0x3->0x6 -mov si, 0 ; ip:0x6->0x9 -mov word [bp+si], si ; ip:0x9->0xb -add si, 2 ; si:0x0->0x2 ip:0xb->0xe -cmp si, dx ; ip:0xe->0x10 flags:->CPAS -jne $-7 ; ip:0x10->0x9 -mov word [bp+si], si ; ip:0x9->0xb -add si, 2 ; si:0x2->0x4 ip:0xb->0xe flags:CPAS-> -cmp si, dx ; ip:0xe->0x10 flags:->CAS -jne $-7 ; ip:0x10->0x9 -mov word [bp+si], si ; ip:0x9->0xb -add si, 2 ; si:0x4->0x6 ip:0xb->0xe flags:CAS->P -cmp si, dx ; ip:0xe->0x10 flags:P->PZ -jne $-7 ; ip:0x10->0x12 -mov bx, 0 ; ip:0x12->0x15 -mov si, 0 ; si:0x6->0x0 ip:0x15->0x18 -mov cx, [bp+si] ; ip:0x18->0x1a -add bx, cx ; ip:0x1a->0x1c -add si, 2 ; si:0x0->0x2 ip:0x1c->0x1f flags:PZ-> -cmp si, dx ; ip:0x1f->0x21 flags:->CPAS -jne $-9 ; ip:0x21->0x18 -mov cx, [bp+si] ; cx:0x0->0x2 ip:0x18->0x1a -add bx, cx ; bx:0x0->0x2 ip:0x1a->0x1c flags:CPAS-> -add si, 2 ; si:0x2->0x4 ip:0x1c->0x1f -cmp si, dx ; ip:0x1f->0x21 flags:->CAS -jne $-9 ; ip:0x21->0x18 -mov cx, [bp+si] ; cx:0x2->0x4 ip:0x18->0x1a -add bx, cx ; bx:0x2->0x6 ip:0x1a->0x1c flags:CAS->P -add si, 2 ; si:0x4->0x6 ip:0x1c->0x1f -cmp si, dx ; ip:0x1f->0x21 flags:P->PZ -jne $-9 ; ip:0x21->0x23 - -Final registers: - bx: 0x0006 (6) - cx: 0x0004 (4) - dx: 0x0006 (6) - bp: 0x03e8 (1000) - si: 0x0006 (6) - ip: 0x0023 (35) - flags: PZ - diff --git a/src/data/simulating_memory/listing_0053_add_loop_challenge b/src/data/simulating_memory/listing_0053_add_loop_challenge Binary files differdeleted file mode 100644 index 0678532..0000000 --- a/src/data/simulating_memory/listing_0053_add_loop_challenge +++ /dev/null diff --git a/src/data/simulating_memory/listing_0053_add_loop_challenge.asm b/src/data/simulating_memory/listing_0053_add_loop_challenge.asm deleted file mode 100644 index f1ec802..0000000 --- a/src/data/simulating_memory/listing_0053_add_loop_challenge.asm +++ /dev/null @@ -1,35 +0,0 @@ -; ======================================================================== -; -; (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved. -; -; This software is provided 'as-is', without any express or implied -; warranty. In no event will the authors be held liable for any damages -; arising from the use of this software. -; -; Please see https://computerenhance.com for further information -; -; ======================================================================== - -; ======================================================================== -; LISTING 53 -; ======================================================================== - -bits 16 - -mov dx, 6 -mov bp, 1000 - -mov si, 0 -init_loop_start: - mov word [bp + si], si - add si, 2 - cmp si, dx - jnz init_loop_start - -mov bx, 0 -mov si, dx -sub bp, 2 -add_loop_start: - add bx, word [bp + si] - sub si, 2 - jnz add_loop_start diff --git a/src/data/simulating_memory/listing_0053_add_loop_challenge.txt b/src/data/simulating_memory/listing_0053_add_loop_challenge.txt deleted file mode 100644 index 79ead2b..0000000 --- a/src/data/simulating_memory/listing_0053_add_loop_challenge.txt +++ /dev/null @@ -1,36 +0,0 @@ ---- test\listing_0053_add_loop_challenge execution --- -mov dx, 6 ; dx:0x0->0x6 ip:0x0->0x3 -mov bp, 1000 ; bp:0x0->0x3e8 ip:0x3->0x6 -mov si, 0 ; ip:0x6->0x9 -mov word [bp+si], si ; ip:0x9->0xb -add si, 2 ; si:0x0->0x2 ip:0xb->0xe -cmp si, dx ; ip:0xe->0x10 flags:->CPAS -jne $-7 ; ip:0x10->0x9 -mov word [bp+si], si ; ip:0x9->0xb -add si, 2 ; si:0x2->0x4 ip:0xb->0xe flags:CPAS-> -cmp si, dx ; ip:0xe->0x10 flags:->CAS -jne $-7 ; ip:0x10->0x9 -mov word [bp+si], si ; ip:0x9->0xb -add si, 2 ; si:0x4->0x6 ip:0xb->0xe flags:CAS->P -cmp si, dx ; ip:0xe->0x10 flags:P->PZ -jne $-7 ; ip:0x10->0x12 -mov bx, 0 ; ip:0x12->0x15 -mov si, dx ; ip:0x15->0x17 -sub bp, 2 ; bp:0x3e8->0x3e6 ip:0x17->0x1a flags:PZ-> -add bx, [bp+si] ; bx:0x0->0x4 ip:0x1a->0x1c -sub si, 2 ; si:0x6->0x4 ip:0x1c->0x1f -jne $-5 ; ip:0x1f->0x1a -add bx, [bp+si] ; bx:0x4->0x6 ip:0x1a->0x1c flags:->P -sub si, 2 ; si:0x4->0x2 ip:0x1c->0x1f flags:P-> -jne $-5 ; ip:0x1f->0x1a -add bx, [bp+si] ; ip:0x1a->0x1c flags:->P -sub si, 2 ; si:0x2->0x0 ip:0x1c->0x1f flags:P->PZ -jne $-5 ; ip:0x1f->0x21 - -Final registers: - bx: 0x0006 (6) - dx: 0x0006 (6) - bp: 0x03e6 (998) - ip: 0x0021 (33) - flags: PZ - |
