Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Fereydoun Memarzanjany authored Jun 18, 2020
1 parent 59d17e0 commit ed6e2ed
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/checked_add.asm
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
14 changes: 14 additions & 0 deletions examples/memory.asm
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]
11 changes: 11 additions & 0 deletions examples/rotate.asm
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
15 changes: 15 additions & 0 deletions examples/stack.asm
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]

0 comments on commit ed6e2ed

Please sign in to comment.