Saturday, 29 December 2012
Star's Triangle In Assembly Language
So, my exams nearly finish but I still have some good codes related to assembly language for posting online. So here is another program for you. This program prints a triangle for the desired number of rows.
[ALSO CHECK: SEARCHING INTEGER PROGRAM IN ASSEMBLY LANGUAGE]
[code lang="html"]
TITLE MASM Template (main.asm)
; Description:
;
; Revision date:
INCLUDE Irvine32.inc
.data
counter dword 1;
.code
main PROC
call readint;
mov ecx,eax;
L1:
push ecx;
mov ecx,counter ;
L2:
mov al,'*';
call writechar;
loop l2;
pop ecx;
inc counter;
call crlf;
loop l1;
exit
main ENDP
end main[/code]
CHECK OUT FACTORIAL PROGRAM IN ASSEMBLY LANGUAGE:
[ALSO CHECK: SEARCHING INTEGER PROGRAM IN ASSEMBLY LANGUAGE]
[code lang="html"]
TITLE MASM Template (main.asm)
; Description:
;
; Revision date:
INCLUDE Irvine32.inc
.data
counter dword 1;
.code
main PROC
call readint;
mov ecx,eax;
L1:
push ecx;
mov ecx,counter ;
L2:
mov al,'*';
call writechar;
loop l2;
pop ecx;
inc counter;
call crlf;
loop l1;
exit
main ENDP
end main[/code]
CHECK OUT FACTORIAL PROGRAM IN ASSEMBLY LANGUAGE:









0 comments
Posts a comment