Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL ; use 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:
- ADD AL, BL ;add AL and BL : A+B
- MOV DL, AL ;move result to DL
- MOV AL, 5 ;reset AL(A) back to 5
- SUB AL, BL ;substract BL from AL and save result to AL : A-B
- OR AL, DL ;or AL with DL and save result to AL :A+B or A-B
- MOV DL, AL ;save result to DL
- MOV AL, 5 ;reset AL back to 5
- FINDY:
- ADD AL, BL ;ADD AL and BL :A+B
- MUL CL ;multiply AL by CL : (A+B)*C
- OPTABLE:
- XOR DL, AL ;xor DL with AL :X XOR Y
- SHL DL,1 ;shift result by 1 bit
- DONE:
- MOV AL, DL
- MOV AH, 4CH ;Select exit function
- INT 21H ;Call the interrupt to exit
- END START
Advertisement
Add Comment
Please, Sign In to add comment