daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Sep 30th, 2018 138 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.     #make_COM#
  4.     org 100h
  5.     jmp start:
  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.     start: lea DX, MSG
  10.      mov AH, 9h
  11.      int 21h
  12.      ;mov AH, 4Ch
  13.      ;int 21h
  14.     .data
  15.      mass db 0ah,0bh, 'Array - ', '$'
  16.      text db 13, 10, 'Output is in ASCII code. Look at the ASCII table of the characters.', '$'
  17.      mas db 10 dup (?)
  18.     .code
  19.     main:
  20.      mov ax,@data
  21.      mov cx, 10
  22.      mov BP, 2
  23.      mov bx, 0
  24.      mov al, 2
  25.      mov ah, 2
  26.      mul ah
  27.     go:
  28.      mov mas[bx], al
  29.      inc BP
  30.      mov ax, BP
  31.      mov ah, al
  32.      mul ah
  33.      inc bx
  34.      loop go
  35.     show_mass:
  36.      mov cx, 10
  37.      mov bx, 0
  38.      mov AH, 9h
  39.      lea DX, mass
  40.      int 21h
  41.     show:
  42.      mov AH, 2h
  43.      mov dl, mas[bx]
  44.      add dl, 30h
  45.      int 21h
  46.      inc bx
  47.      loop show
  48.      mov AH, 9h
  49.      lea DX, text
  50.      int 21h
  51.     exit:
  52.      mov AX, 4Ch
  53.      int 21h
  54.     ret
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top