flat assembler
Message board for the users of flat assembler.

Index > DOS > my first ASM!

Author
Thread Post new topic Reply to topic
nvictor



Joined: 17 Feb 2007
Posts: 31
nvictor 18 Feb 2007, 12:45
Didn't sleep this night for I wanted to run a working progry that I completely understand. After wandering between docs and docs, tutorials and tutorials I've ended at the beginning : the flat assembler programming tutorial Very Happy

I've made three conclusions:
1. I dont need to worry about code segment, data segment when writing .com programs. The CPU load the program in RAM at 100h and start executing instructions. And by the way this is my "hello world!" .com version

Code:
        org  100h

        mov ah,9
        mov dx,message
        int 21h
        mov ax,4c00h
        int 21h

message:
        db      'Hello World!',24h     


2. to write .exe programs (which I don't know yet) the processus must be different from .com progries. I must find how...

3. to add more interactivity to my programs I need to learn more DOS interrupts codes. (that's what I'm doing right now)
Post 18 Feb 2007, 12:45
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 18 Feb 2007, 20:16
online HTML version of Ralf Brown's interrupt list

Check the DOS subforum for some of my silly .COM examples (tiny .ZIP viewer or tiny LFN dir lister), which hopefully should help a bit, at least.
Post 18 Feb 2007, 20:16
View user's profile Send private message Visit poster's website Reply with quote
nvictor



Joined: 17 Feb 2007
Posts: 31
nvictor 19 Feb 2007, 03:34
They will definitely help. I've found a good book which I'm also reading. Very Happy
Post 19 Feb 2007, 03:34
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1902
DOS386 19 Feb 2007, 13:07
Quote:
to write .exe programs (which I don't know yet) the processus must be different from .com progries. I must find how...


Marginally: drop "org 100h", and add "format MZ // push cs // pop ds" Laughing

Works up to 64 KB, for bigger files some problems come up

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 19 Feb 2007, 13:07
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.