Masm ,delay code help ....

Discussion in 'Programmer's Corner' started by jove2493, Dec 6, 2011.

  1. jove2493

    Thread Starter New Member

    Dec 6, 2011
    1
    0
    it MOVE separately by the line....can it possible 7 line of the combination to "T" and "H" move in a same time??
    my code of delay is not work also ......any pro in Masm can give me a help .......T.T


    Code ( (Unknown Language)):
    1. .model small
    2. .stack 64
    3. .data
    4.  
    5.     T1      BYTE    "  +========+ ||     ||    ", 13, 10,"$"
    6.     T2      BYTE    "  +========+ ||     ||    ", 13, 10,"$"
    7.     T3      BYTE    "      ||     ||     ||    ", 13, 10,"$"
    8.     T4      BYTE    "      ||     |||||||||    ", 13, 10,"$"
    9.     T5      BYTE    "      ||     ||     ||    ", 13, 10,"$"
    10.     T6      BYTE    "      ||     ||     ||    ", 13, 10,"$"
    11.     T7      BYTE    "      ||     ||     ||    ", 13, 10,"$"
    12.  
    13.     T8      BYTE    " +=+= +=+= +=+= +=+= +=+= +=+= +=+= +=+=", 13, 10,"$"
    14.  
    15. .code
    16. delay:
    17.     push cx
    18.     push dx
    19.     mov cx,170
    20.     mov dx,1000
    21.     mov ah, 86h
    22.     int 15h
    23.     pop dx
    24.     pop cx
    25.     ret
    26.  
    27. Main proc
    28.     mov ax,@data
    29.     mov ds,ax
    30.    
    31. ;   MOV CX,10  
    32.    
    33.    
    34. display:
    35.      mov bx,2; or whatever
    36. top:
    37.     mov ah, 09H
    38.     lea dx, [T1 + bx]
    39.     int 21h
    40.    
    41.     mov ah, 09H
    42.     lea dx, [T2 + bx]
    43.     int 21h
    44.  
    45.     mov ah, 09H
    46.     lea dx, [T3 + bx]
    47.     int 21h
    48.    
    49.     mov ah, 09H
    50.     lea dx, [T4 + bx]
    51.     int 21h
    52.    
    53.     mov ah, 09H
    54.     lea dx, [T5 + bx]
    55.     int 21h
    56.    
    57.     mov ah, 09H
    58.     lea dx, [T6 + bx]
    59.     int 21h
    60.    
    61.     mov ah, 09H
    62.     lea dx, [T7 + bx]
    63.     int 21h
    64.      
    65.     mov ah, 09H
    66.     lea dx, [T8 + bx]
    67.     int 21h
    68.    
    69.     call delay
    70.     call resetCursor
    71.  
    72.     dec bx
    73.  
    74.     jnz top
    75.     JMP display
    76.        
    77.     mov ax,4c00h
    78.     int 21h
    79.  
    80. main endp
    81.    
    82. clearScreen proc
    83.     MOV AX, 0600H ;AH = 06 (scroll)
    84.     ;AL = 00 (full screen)
    85.     ;MOV    BH, 0fH ;White background (0)
    86.     ;Blue foreground (1)
    87.    
    88.     MOV CX, 0000H    ;Upper left row:column
    89.     MOV DX, 184FH    ;Lower right row:column
    90.    
    91.     INT 10H  ;Call interrupt service
    92.     retn
    93.    
    94. clearScreen endp
    95.    
    96. resetCursor proc
    97.     MOV AH, 02H  ;Request set cursor
    98.     MOV BH, 00   ;Page number 0
    99.     MOV DX, 0000H    ;Row 0, column 0
    100.     INT 10H  ;Call interrupt service
    101.     retn
    102. resetCursor endp
    103.    
    104.     end main
     
Loading...
You May Also Like:

Load More