Advertisement
elephantsarecool

anim

May 13th, 2019
1,059
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. init macro d_name
  2.     push ds
  3.     xor ax, ax
  4.     push ax
  5.     ifnb <d_name>
  6.     mov ax, d_name
  7.     mov ds, ax
  8.     endif
  9. endm
  10. s   segment stack 'stack'
  11.     dw 64 dup(?)
  12. s   ends
  13. d   segment 'data'
  14.     syms db 65,65,65,65,65,32,32,65,65,65,65,65, '?'
  15.     syms1 db 32,32,32,32,32,32,32,32,32,32,32,32, '?'
  16.     kursor db 0, 0, 0, 1, 0, 2, 0, 3, 1, 0, 1, 1, 1, 2, 1, 3, 2, 0, 2, 1, 2, 2, 2, 3
  17. d   ends
  18. c   segment 'code'
  19.     assume ss:s, cs:c, ds:d
  20. main    proc far
  21.     init d
  22.     mov dx, 1016h
  23.     push dx
  24.     Call print
  25.     Call paus
  26.     push dx
  27.     Call print1
  28.     mov dx, 1020h
  29.     push dx
  30.     Call print
  31.     ret
  32.    
  33. main endp
  34. paus proc near
  35.     push cx
  36.     mov cx, 0fh
  37. l3: push cx
  38.     mov cx, 0ffffh
  39. l2: loop l2
  40.     pop cx
  41.     loop l3
  42.     pop cx
  43.     ret
  44. paus endp
  45.  
  46. print   proc near
  47.     push bp
  48.     mov bp, sp
  49.     mov dx, [bp + 4]
  50.     push si di
  51.     xor si, si
  52.     xor di, di
  53. l:  cmp byte ptr syms[si], '?'
  54.     Je ver
  55.     push dx
  56.     add dh, kursor[di]
  57.     add dl, kursor[di + 1]
  58.     mov ah, 2
  59.     int 10h
  60.     mov dl, syms[si]
  61.     mov ah, 2
  62.     int 21h
  63.     inc si
  64.     inc di
  65.     inc di
  66.     pop dx
  67.     Jmp l
  68. ver:    pop di si
  69.     pop bp
  70.     ret 2
  71. print endp
  72. print1  proc near
  73.     push bp
  74.     mov bp, sp
  75.     mov dx, [bp + 4]
  76.     push si di
  77.     xor si, si
  78.     xor di, di
  79. l1: cmp byte ptr syms1[si], '?'
  80.     Je ver1
  81.     push dx
  82.     add dh, kursor[di]
  83.     add dl, kursor[di + 1]
  84.     mov ah, 2
  85.     int 10h
  86.     mov dl, syms1[si]
  87.     mov ah, 2
  88.     int 21h
  89.     inc si
  90.     inc di
  91.     inc di
  92.     pop dx
  93.     Jmp l1
  94. ver1:   pop di si
  95.     pop bp
  96.     ret 2
  97. print1 endp
  98. c ends
  99. end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement