DCPU16 27
[COAL] print triangle using nested loop Guest on 12th November 2020 11:20:42 AM
  1. .model small
  2. .stack 100h
  3. .data
  4. steric dw 1
  5. .code
  6. main proc
  7.    mov ax,@data
  8.    mov ds,ax
  9.    mov cx,5
  10. L1:
  11.    mov bx,cx
  12.    mov cx,steric
  13. L2:  
  14.    mov dl,'*'
  15.    mov ah,2
  16.    int 21h
  17.    loop L2
  18.    inc steric
  19.    mov ah,2
  20.    mov dl,10
  21.    int 21h
  22.    mov dl,13
  23.    mov ah,2
  24.    int 21h
  25.    mov cx,bx
  26.    loop L1
  27.    
  28.    
  29.      mov ah,4ch
  30.      int 21h
  31.    
  32.     main endp
  33. end main

Coding Base is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.