flat assembler
Message board for the users of flat assembler.

Index > Windows > Newbiest, trying to learning

Thread Post new topic Reply to topic
Bruno Krebs

Joined: 05 Jul 2005
Posts: 1
Bruno Krebs 05 Jul 2005, 05:14
Hi, I'm a brazilian guy trying to learn assembly, I had been looking for some tutorials and articles about assembly, but the few I've founded was not really clear to me... They all begin saying that there are some registers(AX, BX, CX,...) but they don't tell us what are registers. Maybe you guys can explain me, what are theese registers? Are they like variables?
Oh something that I should be greatfull to see, is the program and the source of the most simple and popular program, the "Hello World"...
I'm using the flat assembler 1.62 for Win32. I've already tried to put one source that I've found in the internet but does not works...
Well I'm puting the source here too you guys tell me the what is wrong with it.

.MODEL SMALL ;modelo de memória

.STACK 200h ;aloca espaço na pilha

.DATA ;aqui começam os dados e declaração de 


HelloWorld DB "Hello World$" ;string sempre termina com $

.CODE ;aqui começa o código do programa

START: ;e aqui a função principal

MOV DX, OFFSET HelloWorld ;movendo o OFFSET de HelloWorld

MOV AX, SEG HelloWorld ;movendo o segmento de HelloWorld

MOV DS, AX ;e pondo ele no DS

MOV AH, 9h ;número da função do MS-DOS

INT 21h ;chamada de função

MOV AX, 4c00h ;função de saída do programa

INT 21h

END START ;fim do programa


This is exactly what I've put in the flat and I saved it like "Hellow.asm"
Sorry about my poor english and this long topic Embarassed
And thank you for your atention. Razz
Post 05 Jul 2005, 05:14
View user's profile Send private message Reply with quote

Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 05 Jul 2005, 08:52
Hi Bruno
This program is for another assembler -> MASM, and it is written for DOS, not Windows. Look in the examples folder for 'hello' folder, this is about as simple as a windows program gets (see the other examples too, and study them). Hopefully someone else on this board can give you some information about beginning assembly language, I don't have any information to share with you right now. Sorry.
Post 05 Jul 2005, 08:52
View user's profile Send private message Reply with quote

Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 05 Jul 2005, 10:48
try the following, it is about the same ur posted masm source
org 0x100

lea dx,[helloworld]
mov ah,9h
int 21h

mov ax,4c00h
int 21h

helloworld db "Hello World$"
Post 05 Jul 2005, 10:48
View user's profile Send private message Visit poster's website Reply with quote

Joined: 16 Mar 2005
Posts: 7997
Location: 22° 15' N | 114° 10' E
YONG 05 Jul 2005, 12:09
We may take advantage of FASM's syntax that a label simply means its offset, and thus the code can be simplified to:
mov dx, helloworld
mov ah, 9
int 21h

Post 05 Jul 2005, 12:09
View user's profile Send private message Visit poster's website Reply with quote
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 05 Jul 2005, 15:33
Post 05 Jul 2005, 15:33
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Fungos Bauux

Joined: 19 Jan 2005
Posts: 31
Location: CWB
Fungos Bauux 06 Jul 2005, 13:54
Hi Bruno, im Brazilian too.. we can talk about asm programming, I have some old 8086/z80/8051 and 80386 asm knowledge.. so I stopped there in the ages of asm virii writing.. but now Im trying to get back to asm, but i havent too much time to do anything Sad If do you want to talk with me.. ICQ UIN: 8380948 MSN: danny.linux@gmx.net JABBER: fungosbauux@jabber.org
Post 06 Jul 2005, 13:54
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote

Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 06 Jul 2005, 23:24
BTW, this should be in the DOS or General forums, as the examples do not pertain to Windows.
Post 06 Jul 2005, 23:24
View user's profile Send private message AIM Address Reply with quote

Joined: 14 Nov 2004
Posts: 1
spectrebane 10 Jul 2005, 20:59
You should try this site/book:


The Art of Assembly Language Programming by Randall Hyde

It teaches more than assembly programming. I bet you'll download the hole site...

PS: I'm brazilian too! Maybe the internet is not too big as it seem...
Post 10 Jul 2005, 20:59
View user's profile Send private message Reply with quote

Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 10 Jul 2005, 22:56
Hi there!
I'm brazilian too! Very Happy
I started learning asm to understand how computer viruses work. I was so happy with asm and I loved DOS so much.
But now I'm learning asm with Win32 and find it quiet funny. Now I know how to use those int's from DOS ages, as well as windows api's. Very Happy
It's good to have a lots of brazilians using FASM, cause it's the best assembler I've ever seen. And I'm 18 now, and studying programming since I was 12. But I fell in love with asm and FASM! Very Happy

Good luck with you self-teaching (this is how I learn my 12 languages and learned deeper asm and C.)

For brazilians only: Vamo la porraaa!!! Os coders brasileiros são os melhores!!! LOL
Post 10 Jul 2005, 22:56
View user's profile Send private message Reply with quote
El Tangas

Joined: 11 Oct 2003
Posts: 120
Location: Sunset Empire
El Tangas 11 Jul 2005, 20:11
Register are in fact like variables, stored inside the processor, and not in external memory like real variables. You can do more things with registers than with normal variables, but there is only a small number of them.
The code example you posted is meant to be compiled to an .exe file, thats why it has separate sections ( .code, .data). To learn assembly, you should start by .com files, that are simpler. Also, you have to get a debugger to see what happens when your programs run, you will learn a lot that way. To learn MS-DOS assembly, I recomend Borland Turbo Debugger, you can get it from Borland's site for free.

Longo e penoso é o caminho do aprendiz de assembly, mas as recompensas são grandes...

Boa sorte
Post 11 Jul 2005, 20:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.