home *** CD-ROM | disk | FTP | other *** search
- %TITLE "ADD/SUB/INC/DEC instructions demo"
-
- IDEAL
- DOSSEG
- MODEL small
- STACK 256
-
- DATASEG
-
- exitCode DB 0 ;if you want comments
- count DW 1 ; buy the book
-
- CODESEG
-
- Start:
- mov ax,@data
- mov ds,ax
-
- mov ax,4
- mov bx,2
- add ax,bx
-
- mov cx,8
- mov cx,[count]
-
- add [count],cx
-
- inc [count]
- dec [count]
- inc ax
- dec cx
-
- Exit:
- mov ah,04Ch
- mov al,[exitCode]
- int 21h
-
- End Start