Page 1 of 1


Posted: Fri Oct 16, 2009 8:23 pm
by bongomeno
I am learning assembly language and wrote a small little program.
You can draw simple pictures with it. Use the left mouse button to draw and the right button to clear the screen. To exit, simply move the cursor to the origin (0,0) of the screen.

I thought it would be a good example program to post. :)

Code: Select all

;ASM PAINT - By Gemino Smothers
;set screen mode
mov ah,00
mov al,0F
int 10
;display cursor
mov ax,01
int 33
;return cursor position and button status
mov ax,03
int 33
;if left buttun down then draw the pixel
cmp bx,01
jne 0123
push cx
push dx
dec cx
dec dx
mov ah,0C
mov al,01
mov bh,00
int 10
pop cx
pop dx
;if right button then reset the screen
cmp bx,02
je 0100
cmp cx,00
jne 010B
cmp dx,00
jne 010B
;return screen mode
mov ah,00
mov al,02
int 10
;end program
mov ax,00
int 21
Procedural programming FTW!

Posted: Sat Oct 17, 2009 10:02 am
by BigBadKing
I tried your program bongomeno, its not bad. althrough, having something to change the colors may help. you can, for example. make the right button change the color, and the C button on the keyboard to clear the screen. but still... its good for an assembly beginner :mrgreen:

Posted: Sat Oct 17, 2009 2:32 pm
by bongomeno
Thank you. :D
I will add more to this later.. maby press both buttons to clear and right button to change?

neat program

Posted: Mon Nov 30, 2009 9:35 pm
by Kiyotewolf

I wish I could grasp 8088(80386) assembly like you do.

The only form of assembly I could understand was 6502 based.

o.o would you take requests to help someone with a problem in assembly?

I have at least 2 projects,.. 1 in QBasic, 1 that could be in both QB & FB..
that need a ASM boost.



Posted: Wed Dec 16, 2009 2:49 am
by TmEE
Pretty nice start you have there :D

I hate x86 ASM, I did write a 2000 line library for my QB stuff though :P
Nothing beats 680x0 series when it comes to ASM 8)

Posted: Wed Dec 16, 2009 11:02 am
by bongomeno

I would actually prefer to be learning 6502 or z80 asm rather than x86, but it seems easier for now.