home *** CD-ROM | disk | FTP | other *** search
- %TITLE "AND/OR/XOR instructions demo"
-
- IDEAL
- DOSSEG
- MODEL small
- STACK 256
-
- DATASEG
-
- exitCode DB 0 ;if you want comments
- sourceWord DW 0ABh ; BUY the book
- wordMask DW 0CFh
-
- CODESEG
-
- Start:
- mov ax,@data
- mov ds,ax
-
- mov ax,[sourceWord]
- mov bx,ax
- mov cx,ax
- mov dx,ax
-
- and ax,[wordMask]
- or bx,[wordMask]
- xor cx,[wordMask]
- xor dx,dx
-
- Exit:
- mov ah,04Ch
- mov al,[exitCode]
- int 21h
-
- End Start