Advertisement
rootUser

AL.asm

Feb 7th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CODE SEGMENT
  2.     ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE
  3.    
  4.     PPIC_Control EQU 1EH
  5.     PPIC EQU 1CH
  6.     PPIB EQU 1AH
  7.     PPIA EQU 18H
  8.    
  9.     ORG 1000H
  10.     MOV AL, 10000000B
  11.     OUT PPIC_Control, AL
  12.    
  13.     MOV AL, 11111111B
  14.     OUT PPIA, AL
  15.    
  16. L1: MOV AH, 00000001B
  17.     CALL DISPLAY_A
  18.     JMP L1
  19.    
  20.  
  21. ; Calling this procedure destroys AH
  22. DISPLAY_A:
  23.     MOV SI, OFFSET FONT
  24.     MOV CX, 08H
  25. DISPLOOP: MOV AL, BYTE PTR CS:[SI]
  26.     OUT PPIB, AL    
  27.     MOV AL, AH
  28.     OUT PPIC, AL
  29.     CALL TIMER
  30.     INC SI
  31.     CLC
  32.     ROL AH, 1
  33.     LOOP DISPLOOP
  34.     RET
  35.     ;
  36.  
  37.  
  38. ; TIMER procedure
  39. TIMER:  PUSH CX
  40.         MOV CX, 700
  41. TIMER1: NOP
  42.         NOP
  43.         NOP
  44.         NOP
  45.         LOOP TIMER1
  46.         POP CX
  47.         RET
  48.         ;
  49.  
  50.  
  51. FONT:   DB 11111111B        ; Mask for the column on the far left
  52.         DB 11000000B
  53.         DB 10110111B
  54.         DB 01110111B
  55.         DB 01110111B
  56.         DB 10110111B
  57.         DB 11000000B
  58.         DB 11111111B        ; Mask for the column on the far right
  59.         ;
  60.  
  61. CODE ENDS
  62. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement