on-internet
← Community

Draw a triangle in assembly with fasm

Stack Overflow ·

I'm trying to draw a triangle in assembly using fasm but I just can't make it. I have the following code to draw a rectangle and I thought that I should just decrease the [comp] value inside the cycle "ciclopinta" but that just doesn't work (or I'm doing it wrong). org 100h mov ah,4fh mov al,02h mov bx,13h int 10h mov [alt],50 mov [comp], 100 mov dx, 100 mov cx,100 ciclopinta: ciclo1: mov ah,0ch mov al,23h mov bh, 0 int 10h dec cx dec byte[comp] jnz ciclo1 mov cx, 100 mov [comp],100 dec dx dec byte [alt] jnz ciclopinta mov ah, 07h int 21h mov ah,4ch int 21h comp rb 1 alt rb 1

Comments

Sign in or sign up to comment and upvote.

No comments yet.