Listing 46

This commit is contained in:
Joseph Ferano 2025-03-19 21:07:11 +07:00
parent a91c3d9ba9
commit fd8f696627
2 changed files with 52 additions and 0 deletions

28
asm_files/list-0046.asm Normal file
View File

@ -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

24
asm_files/list-0046.txt Normal file
View File

@ -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