Advertisement
Guest User

Untitled

a guest
Sep 30th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #make_COM#
  2. org 100h
  3.  
  4. jmp start:
  5.  
  6.  MSG db 'German Volf is creator of this programm.', 13, 10
  7.      db 'My task:', 13, 10
  8.      db 'I need to create cycle for filling array, composed of 10 elements (squares of natural numbers) size 1 byte.', '$'
  9.      
  10. start: lea DX, MSG
  11.  
  12.  mov AH, 9h
  13.  int 21h
  14.  ;mov AH, 4Ch
  15.  ;int 21h    
  16.  
  17. .data
  18.  
  19.  mass db 0ah,0bh, 'Array - ', '$'
  20.  text db 13, 10, 'Output is in ASCII code. Look at the ASCII table of the characters.', '$'
  21.  mas db 10 dup (?)
  22.  
  23. .code
  24. main:
  25.  
  26.  mov ax,@data
  27.  mov cx, 10
  28.  mov BP, 2
  29.  mov bx, 0
  30.  mov al, 2
  31.  mov ah, 2
  32.  mul ah
  33.  
  34. go:
  35.  
  36.  mov mas[bx], al
  37.  inc BP
  38.  mov ax, BP
  39.  mov ah, al
  40.  mul ah
  41.  inc bx
  42.  loop go
  43.  
  44. show_mass:
  45.  
  46.  mov cx, 10
  47.  mov bx, 0
  48.  mov AH, 9h
  49.  lea DX, mass
  50.  int 21h
  51.  
  52. show:
  53.  
  54.  mov AH, 2h
  55.  mov dl, mas[bx]
  56.  add dl, 30h
  57.  int 21h
  58.  inc bx
  59.  loop show
  60.  
  61.  
  62.  mov AH, 9h
  63.  lea DX, text
  64.  int 21h
  65.  
  66. exit:
  67.  
  68.  mov AX, 4Ch
  69.  int 21h
  70.  
  71. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement