1-2: Assignment complete w/o challenge

This commit is contained in:
Hane 2026-01-25 00:49:23 +01:00
commit 1a7041ab9d
6 changed files with 120 additions and 29 deletions

31
1-2/listing-39.asm Normal file
View file

@ -0,0 +1,31 @@
bits 16
; Register-to-register
mov si, bx
mov dh, al
; 8-bit immediate-to-register
mov cl, 12
mov ch, -12
; 16-bit immediate-to-register
mov cx, 12
mov cx, -12
mov dx, 3948
mov dx, -3948
; Source address calculation
mov al, [bx + si]
mov bx, [bp + di]
mov dx, [bp]
; Source address calculation plus 8-bit displacement
mov ah, [bx + si + 4]
; Source address calculation plus 16-bit displacement
mov al, [bx + si + 4999]
; Dest address calculation
mov [bx + di], cx
mov [bp + si], cl
mov [bp], ch