need help please anyone

ok ive been given a task of writing a program using repeating structures to print a tree like this
*
***
*
***
*****
*
***
*****
*******
*
***
*****
*******
*********

you get the idea. im using the a86 assembler program and have done quite a bit aleady but i can only get one star to show if i use a jum or rtn command on the procedure it goes nus and displays stars everywere.

here is my code;

setup MACRO ;macro setup:move cursur
MOV AH,2
MOV BH,0
MOV DH,#1
MOV DL,#2
INT 10H
#EM

Clear MACRO ;clear screen
MOV AX,02H
INT 10H
#EM

Display MACRO
MOV DL,42
MOV AH,2
INT 21H
#EM

Code_Seg SEGMENT
ASSUME CS:Code_Seg, DS:Code_Seg

ORG 0100H ;Start address

MAIN: clear
MOV CH,3
MOV BL,CH
call Tree

INT 20H ;Return to DOS


code_seg ENDS
END Main

;----------------------------------------------------------------------
;Define the data
;----------------------------------------------------------------------

Tree: PROC NEAR
MOV CL,40
SUB CL,BL
Setup 0,CL
Display
DEC BL
CMP BL,0
RET
Tree ENDP

;----------------------------------------------------------------------
Code_Seg ENDS
END Main
;----------------------------------------------------------------------

if anyone can help i please let me know where im going wrong
thanks
Dits

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories