Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL ; use small memory model
- .STACK 100H ; reserves 100h bytes for stack
- .CODE ; starts code segment
- START:
- ;set nic 1st (A) , 2nd (B) , 3rd (C) numbers to AL,BL,CL registers
- MOV AL, 5
- MOV BL, 5
- MOV CL, 0
- FINDX:
- ; evaluate X = C * A
- MUL CL ; multiply CL by AL : C*A
- MOV DL, AL ; save result to DL
- RESETXY:
- MOV AL, 5 ; reset AL back to 5
- FINDY:
- ;evaluate Y = (A+B) OR C
- ADD AL, BL ;add AL(A) and BL(B) : (A+B)
- OR AL, CL ;or AL(A) and CL(C) : (A+B) OR C
- OPTABLE:
- XOR DL, AL ;XOR DL(x) and AL : X XOR Y
- SHL DL,1 ;shift result by 1 bit
- DONE:
- MOV AL, DL ;save result to AL
- MOV AH, 4CH ;Select exit function
- INT 21H ;Call the interrupt to exit
- END START
Advertisement
Add Comment
Please, Sign In to add comment