We don't do your homework for you. Show some effort of your own toward solving the problem before simply demanding code.
.model small .code org 100h start: mov cx, 5 L1: push cx L2: mov ah,2h mov dl,2Ah int 21h loop L2 mov dl,0Ah int 21h mov dl,0Dh int 21h pop cx loop L1 mov cx,5 L3: push cx L4: mov ah,2h mov dl,20h int 21h loop L4 mov dl,2Ah int 21h mov dl,0Ah int 21h mov dl,0Dh int 21h pop cx loop L3 exit: int 20h end start
I just can do this... (> <) to display
to display the triangle below, I still can not....
There's a flaw in your second loop. You're printing the right amount of spaces, but you're only printing one
*, hence you don't end up with this:
> * > ** > *** > **** > *****
To achieve the above, you need to introduce a counter much like you did in your first loop so that after you've printed the spaces, you print 1
* for the first line of the above pattern, 2 for the next and so on.
It's a bit difficult for me to put into words clearly, but I hope it's helped somewhat.
Can you give a test to this code:
.286 .model small .stack 1024h .code start: mov cx, 5 first: mov bl, 2ah mov bh, 1 call drawall loop first mov dx, 5 second: mov bl, 20h mov bh, 0 mov cx, dx call drawall mov cx, 6 sub cx, dx mov bl, 2ah mov bh, 1 call drawall dec dx jnz second mov ax, 4c00h int 21h drawall: push ax push bx push cx push dx drawone: mov ah,2h mov dl,bl int 21h loop drawone or bh, bh jz retorn mov dl,0Ah int 21h mov dl,0Dh int 21h retorn: pop dx pop cx pop bx pop ax ret end start
Please, forgive me if I am wrong.
.MODEL SMALL .STACK 50H .DATA NL DB 0DH, 0AH, '$' ; NL = NEXT LINE .CODE MAIN PROC MOV AX, @DATA MOV DS, AX MOV CX, 5 MOV BX, 1 FOR_1: PUSH CX MOV DL, 20H ; 20H IS ASCII CODE FOR SPACE MOV AH, 2 FOR_2: INT 21H ; PRINTING SPACES LOOP FOR_2 MOV CX, BX MOV DL, '*' MOV AH, 2 FOR_3: INT 21H ; PRINTING STARS LOOP FOR_3 LEA DX, NL MOV AH, 9 INT 21H ; MOVE CURSOR TO THE START OF NEXT LINE INC BX POP CX LOOP FOR_1 MOV AH, 4CH INT 21H MAIN ENDP END MAIN
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Hello All ...
Iam Getting An Error With try to excecute the stored procedure .
I have Have Sql database , the stored procedure like so :
USE [MPRS] GO /****** Object: StoredProcedure [dbo].[Search_Licenses_By_Number] Script Date: 26-Nov-16 8:06:52 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Here is the sample output that I ...