diff --git a/asm_files/list-0046.asm b/asm_files/list-0046.asm new file mode 100644 index 0000000..09f8205 --- /dev/null +++ b/asm_files/list-0046.asm @@ -0,0 +1,28 @@ +; ======================================================================== +; +; (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 46 +; ======================================================================== + +bits 16 + +mov bx, -4093 +mov cx, 3841 +sub bx, cx + +mov sp, 998 +mov bp, 999 +cmp bp, sp + +add bp, 1027 +sub bp, 2026 diff --git a/asm_files/list-0046.txt b/asm_files/list-0046.txt new file mode 100644 index 0000000..ce58fec --- /dev/null +++ b/asm_files/list-0046.txt @@ -0,0 +1,24 @@ +--- test\listing_0046_add_sub_cmp execution --- +mov bx, 61443 ; bx:0x0->0xf003 +mov cx, 3841 ; cx:0x0->0xf01 +sub bx, cx ; bx:0xf003->0xe102 flags:->S +mov sp, 998 ; sp:0x0->0x3e6 +mov bp, 999 ; bp:0x0->0x3e7 +cmp bp, sp ; flags:S-> +add bp, 1027 ; bp:0x3e7->0x7ea +sub bp, 2026 ; bp:0x7ea->0x0 flags:->PZ + +Final registers: + bx: 0xe102 (57602) + cx: 0x0f01 (3841) + sp: 0x03e6 (998) + ax: 0x0000 (0) + bp: 0x0000 (0) + dx: 0x0000 (0) + si: 0x0000 (0) + di: 0x0000 (0) + es: 0x0000 (0) + ss: 0x0000 (0) + cs: 0x0000 (0) + ds: 0x0000 (0) + flags: PZ