Page 1 of 2
16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 7:24 pm
by Sean3
Code: Select all
-a 100
XXXX:0100 mov ah,09 ;String Function
XXXX:0102 mov dx,0109 ;Address of 0109
XXXX:0105 int 21 ;Do it
XXXX:0107 int 20 ;exit the program
XXXX:0109 db "HelloWorld" ;Charater to output
XXXX:0113 ;<return>
-rcx ;edit the cx register
CX 0000
:0113 ;File size of our program
-n hello.com ;Name of file with a .com extention
-w ;Write the byte size
Writing 00113 bytes
-q ;quit the program
You will get used to it someday. I had trouble first look
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 8:03 pm
by acerookie1
Sean3 wrote:Code: Select all
-a 100
XXXX:0100 mov ah,09 ;String Function
XXXX:0102 mov dx,0109 ;Address of 0109
XXXX:0105 int 21 ;Do it
XXXX:0107 int 20 ;exit the program
XXXX:0109 db "HelloWorld" ;Charater to output
XXXX:0113 ;<return>
-rcx ;edit the cx register
CX 0000
:0113 ;File size of our program
-n hello.com ;Name of file with a .com extention
-w ;Write the byte size
Writing 00113 bytes
-q ;quit the program
You will get used to it someday. I had trouble first look
any recomendations on a tut on asm?
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 8:09 pm
by Sean3
I can do a user input tut.
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 8:21 pm
by acerookie1
Sean3 wrote:I can do a user input tut.
yeah i meant a link to a completely noob friendly version of asm.
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 8:43 pm
by eatcomics
google works well...
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 8:57 pm
by acerookie1
eatcomics wrote:google works well...
yeah then i wouldnt be askin here... none of em make them as easy or well explained as i learned c++, c or c#. its really like posted source code.
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 9:37 pm
by dandymcgee
@Sean3: Are you running XP? Might want to consider explaining the context of your snippet:
Typing those commands into debug.exe (an assembler/debugger included in Windows operating systems before Vista) will yield the executable "hello.com". This is a 16-bit console program that will only run natively on 32-bit operating systems (can be emulated rather easily using DOSBox on a 64-bit OS).
I recommend you take a look at
FASM.
@acerookie1: Assembly isn't easy. If you're interested in learning check this out:
https://web.archive.org/web/20121025004 ... /~btketman
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 9:52 pm
by avansc
perhaps something a bit cleaner.
Code: Select all
.MODEL Small
.STACK 100h
.DATA
db msg 'Hello, world!$'
.CODE
start:
mov ah, 09h
lea dx, msg ; or mov dx, offset msg
int 21h
mov ax,4C00h
int 21h
end start
Re: 16 bit Assembly Hello World
Posted: Sun Aug 01, 2010 10:37 pm
by acerookie1
thanx man.
Re: 16 bit Assembly Hello World
Posted: Mon Aug 02, 2010 12:15 pm
by Sean3
dandymcgee wrote:@Sean3: Are you running XP? Might want to consider explaining the context of your snippet:
Typing those commands into debug.exe (an assembler/debugger included in Windows operating systems before Vista) will yield the executable "hello.com". This is a 16-bit console program that will only run natively on 32-bit operating systems (can be emulated rather easily using DOSBox on a 64-bit OS).
I recommend you take a look at
FASM.
@acerookie1: Assembly isn't easy. If you're interested in learning check this out:
http://www.btinternet.com/~btketman/
Yes I'm using winxp, but I'm more used to debug fasm says its a virus with norton so now I'm thinking of getting rid of AV.
Re: 16 bit Assembly Hello World
Posted: Mon Aug 02, 2010 2:52 pm
by dandymcgee
Sean3 wrote:dandymcgee wrote:@Sean3: Are you running XP? Might want to consider explaining the context of your snippet:
Typing those commands into debug.exe (an assembler/debugger included in Windows operating systems before Vista) will yield the executable "hello.com". This is a 16-bit console program that will only run natively on 32-bit operating systems (can be emulated rather easily using DOSBox on a 64-bit OS).
I recommend you take a look at
FASM.
@acerookie1: Assembly isn't easy. If you're interested in learning check this out:
http://www.btinternet.com/~btketman/
Yes I'm using winxp, but I'm more used to debug fasm says its a virus with norton so now I'm thinking of getting rid of AV.
LOL.. it's Norton that's the virus. Good luck getting rid of it (I highly recommend a full backup before even considering attempting anything).
Re: 16 bit Assembly Hello World
Posted: Mon Aug 02, 2010 9:02 pm
by LeonBlade
Assembly?!?!?! Sounds like a virus!!
Re: 16 bit Assembly Hello World
Posted: Thu Aug 05, 2010 12:51 pm
by eatcomics
leon I love how your pic changes every month :D and also... assembly... like legos right? is what you are thinking leon
Re: 16 bit Assembly Hello World
Posted: Thu Aug 05, 2010 4:22 pm
by LeonBlade
eatcomics wrote:leon I love how your pic changes every month :D and also... assembly... like legos right? is what you are thinking leon
YEAH LEGOS THANKS
http://www.landoverbaptist.net/showthread.php?t=27290
Re: 16 bit Assembly Hello World
Posted: Thu Aug 05, 2010 5:37 pm
by JaxDragon
Is that site a joke? Or are people THAT obsessive over things.
Ok, I know there are people who are, but is there really
an entire website full of them? They think denmark is evil??
EDIT: Not stereotyping religious people, just people who analyze things to such extremes lol.