-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fereydoun Memarzanjany
authored
Jun 18, 2020
1 parent
59d17e0
commit ed6e2ed
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
; Assemble with "nasm -O0 -f bin checked_add.asm" | ||
|
||
cpu 8086 | ||
|
||
|
||
mov ax, 5000 | ||
mov cx, -900 | ||
|
||
add ax, cx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; Assemble with "nasm -O0 -f bin memory.asm" | ||
|
||
cpu 8086 | ||
|
||
mov cx, 1024 | ||
push cx | ||
pop ds | ||
mov di, 55 | ||
mov bp, 5 | ||
|
||
mov [ds:di+bp+404], word 8 | ||
|
||
mov di, 464 | ||
mov ax, [di] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; Assemble with "nasm -O0 -f bin rotate.asm" | ||
|
||
cpu 8086 | ||
|
||
|
||
stc | ||
mov cl, 00011100b | ||
rcl cl, 1 ; CL = 00111001b, CF = 0 | ||
|
||
mov al, 250 | ||
rol al, 1 ; CL = 500, OF = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; Assemble with "nasm -O0 -f bin stack.asm" | ||
|
||
cpu 8086 | ||
|
||
|
||
mov ax, 100h | ||
mov ss, ax | ||
mov sp, 100h | ||
|
||
mov bx, 500 | ||
push bx | ||
|
||
mov bp, sp | ||
|
||
mov dx, [bp] |