Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- wantedTemp db 60
- jmp main
- main:
- PRINTN
- mov ah, 06h
- mov dl, 0FFh
- int 21h
- jnz chngTrgTemp
- in al, 125
- cmp al, wantedTemp
- jb therm_on
- jae therm_off
- chngTrgTemp:
- cmp al, '+'
- jne subToTemp
- jmp addToTemp
- jmp main
- therm_on:
- mov bl, al
- mov al, 1
- out 127, al
- ;printing the current temp
- mov ax, 0
- mov al, bl
- call print_num
- jmp main
- therm_off:
- mov bl, al
- mov al, 0
- out 127, al
- ;printing the current temp
- mov ax, 0
- mov al, bl
- call print_num
- jmp main
- addToTemp:
- cmp wantedTemp, 120
- jne addTemp
- jmp main
- addTemp:
- add wantedTemp, 1
- ;Printing the dest temp
- xor ax, ax
- mov al, wantedTemp
- call print_num
- PRINTN
- jmp main
- subToTemp:
- cmp wantedTemp, 1
- jne subTemp
- jmp main
- subTemp:
- sub wantedTemp, 1
- ;Printing the dest temp
- xor ax, ax
- mov al, wantedTemp
- call print_num
- PRINTN
- jmp main
- finish:
- mov ah, 0
- int 16h
- ret
- include magshimim.inc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement