KillianMills

Old Assembly

Nov 19th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. ;Question 1 - 2012
  2. JMP START
  3. DB 50 ;INTERUP PROCEDURE LOCATION
  4.  
  5. START:
  6. MOV DL, C0 ;MEM LOC OF VDU
  7.  
  8. MOV AL, 0A ; sets al to 10, or 0A which is 10 in asci. 10 miliseconds= 1 second
  9. OUT 02 ; assigns the 0a to the interrupt 02, giving it an interrupt time of 1 second
  10.  
  11. MOV AL, 2E ; ASCII FOR "."
  12. STI ;TURN ON INTERUPTS
  13.  
  14. LOOP:
  15. JMP LOOP ;INFINTE LOOP
  16.  
  17. ORG 50
  18. CLI ;STOP INTERUPTS
  19. MOV [DL], AL ;OUTPUT "." TO CURRENT MEM LOC
  20. CMP DL, FF ;CHECK IF AT END
  21. JZ END ;IF SO JUMP TO END
  22. INC DL ;OTHER WISE MOVE NEXT MEM LOC
  23. IRET ;RETURN FROM INTERUPT AND TURN BACK ;ON INTERUPTS
  24.  
  25. END:
  26. END
Advertisement
Add Comment
Please, Sign In to add comment