flat assembler
Message board for the users of flat assembler.

Index > DOS > Starting with assembler under dos

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Cor



Joined: 30 Nov 2006
Posts: 13
Location: Poederoijen, Netherlands
Cor 01 Dec 2006, 16:10
thank you, its a nice tutorial if i can see.
assembly is a nice program language Rolling Eyes
Post 01 Dec 2006, 16:10
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 02 Dec 2006, 05:57
(bold means open source):

  1. Necromancer's DOS Navigator (excellent/powerful, built-in disasm and hex view, beta is often updated)
  2. TDE (easy to use, menu, hilite, configurable, lots of nice features, my favorite) Cool
  3. Raved (menu/shortcuts, folding)
  4. AE (folding, w/ menu, binaries available for a billion OSes)
  5. JED (folding, menu, can mimic Wordstar, Emacs, vi, etc. and has modes for pcre, grep, md5, tar, tree, info, etc.)
  6. FTE (folding, tags, menu ... or try hybrid DOS/Win32 .EXE by Japheth here)
  7. FED (folding, hilite, w/ Tetris)
  8. SETEDIT (a lot like Borland's IDEs, menus, tags, hilite)
  9. MBedit (like Intel's Aedit, hilite, menu/shortcuts, very portable)
  10. PEDIT (cua, built-in spell checker + thesaurus)
  11. VILE (vi, based on older MicroEmacs, tags, multiple buffers)
  12. VIM (16- or 32-bit vi, folding, hilite, tags, multiple buffers)
  13. Elvis (16-bit vi, tags, multiple buffers; 2.2 is crippled by low mem, 1.8 isn't)
  14. Stevie (16-bit vi, tags, online help)
  15. XVI 2.47.1 (16-bit vi, tags, multi-win, multiple buffers)
  16. TPE (online help, multi-win, EMS/XMS support, catches Borland compilers' errors, configurable)
  17. ZED src & DOS .EXE (menu, multi-win, etc.)
  18. mined (menu, Unicode and CJK support in plain terminal)
  19. Bloček (menu, Unicode via gfx in pure DOS, also views gfx pics)
  20. Freyja (16-bit Emacs w/ menus)
  21. FreeMacs (16-bit Emacs, written in TASM, tags, good/powerful but 64k file limit)
  22. JASSPA MicroEmacs 09/2006 (folding, menus, configurable, hilite, very portable)
  23. GNU Emacs 20.05
  24. GNU Emacs 19.34 (older, smaller)
  25. e3 (written in NASM, use Win9x .EXE (using Emacs, vi, Wordstar, etc. keys) w/ HXRT)
  26. FASMD (now included in standard FASM/DOS package, multi-file, hilite, has FASM built-in) Cool
  27. FreeDOS edit (menus, multi-win, calendar, online help, but 64k size limit)
  28. FreeDOS edlin
  29. deadlin (edlin clone)
  30. GNU ed (the standard *nix line editor)


Finding a comfortable text editor is a very personal (and difficult) choice. Of this entire list, hopefully one is good enough! Laughing

EDIT: "vi's modality may be hard on the brain, but Emacs is hard on the hand Wink" -- Dave Kenny


Last edited by rugxulo on 03 Apr 2008, 20:41; edited 34 times in total
Post 02 Dec 2006, 05:57
View user's profile Send private message Visit poster's website Reply with quote
Cor



Joined: 30 Nov 2006
Posts: 13
Location: Poederoijen, Netherlands
Cor 02 Dec 2006, 08:24
thank you.

I have download pedit and its a nice program. Very Happy
I have read the tutorial, assembly is a easy programming language my frends tel me its a very dificult language, i have see its not very difficult, its nice.

I wil send and recieve data with the serial port. I have read the FAQ and found this information.
http://www.nondot.org/sabre/os/files/Communication/ser_port.txt
when its worked then i post the code and orther information about my project.

My project:
I have last year learn assembler for the avr microcontrollers and i wil interface the avr to the pc. and i have tree old pc's. one running under dos and two don't works (she have no dos or window's or linux). If this works then can i control apparatus and robots with the pc.

I hope next week to post code for this project.
Post 02 Dec 2006, 08:24
View user's profile Send private message Reply with quote
Cor



Joined: 30 Nov 2006
Posts: 13
Location: Poederoijen, Netherlands
Cor 02 Dec 2006, 10:51
I have tomorrow written a begin of the program, its for beeps at the pc speaker when there is comunications with the microcontroller has start en when this is stop (two smal beeps).

I have a small problem:
If i run the program and the program is stop then can i not go to dos. (and all orther programs i make have the same problem).

if i make a .com file is it not a problem, if i make a .exe file wel. and i wil make a .exe file.

Can you help me, please?

---edit---
The problem is:
I wil return to dos, if the program is be run't

thank you
Post 02 Dec 2006, 10:51
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 02 Dec 2006, 22:23
Cor, no idea. Shocked

BUT, if your other computers need DOS to work, get FreeDOS (it's, uh, free Laughing):

If a simple floppy distro would be better, you can get one of these.

<EDIT> You may need DSKCOPYX.ZIP + src to write the .IMG to a floppy. EXTRACT or SHSUFDRV will help insert/extract or list files in the .IMG.
</EDIT>


Last edited by rugxulo on 09 Jun 2007, 18:15; edited 4 times in total
Post 02 Dec 2006, 22:23
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 03 Dec 2006, 09:20
we can not help you without source of your not-working program
Post 03 Dec 2006, 09:20
View user's profile Send private message Visit poster's website Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat 03 Dec 2006, 17:19
Cor wrote:
If i run the program and the program is stop then can i not go to dos. (and all orther programs i make have the same problem).

if i make a .com file is it not a problem, if i make a .exe file wel. and i wil make a .exe file.


How are you exiting? (The only way to properly terminate an EXE program is with int 21 function 4C.)
Post 03 Dec 2006, 17:19
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 03 Dec 2006, 17:29
Goplat wrote:
The only way to properly terminate an EXE program is with int 21 function 4C.

If your have CS equal to your PSP segment, you can exit with INT 20h aswell.
Since PSP segment is 256 bytes long an always resides in memory just below your program, you can even emulate the .com program environment with an MZ EXE (this is what fasm does when it converts the .com into an MZ stub of PE executable, but that's another story):
Code:
format MZ
entry PSP:start

segment main
PSP = main - (100h shr 4)
org 100h

start:

        mov     ah,9
        mov     dx,_hello       ; DS points to PSP on entry
        int     21h

        xor     ah,ah
        int     16h

        int     20h

_hello db 'Hello!',0Dh,0Ah,'$'    


PS. As for editors/IDEs in DOS, there's a small surprise coming soon. Wink
Post 03 Dec 2006, 17:29
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 03 Dec 2006, 22:56
Quote:
PS. As for editors/IDEs in DOS, there's a small surprise coming soon. Wink

I hope its the editor written by you, as i have code my own for my OS and would like to see how the Master got round some of the problems Wink .
Post 03 Dec 2006, 22:56
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 04 Dec 2006, 07:30
As for the DOS Navigator, I still use and prefer the original one. I was so used to it that every change to that "canon" distracts me (and I don't have a need for long names). Also the original version work perfectly even on very low-end machines.
Post 04 Dec 2006, 07:30
View user's profile Send private message Visit poster's website Reply with quote
Cor



Joined: 30 Nov 2006
Posts: 13
Location: Poederoijen, Netherlands
Cor 04 Dec 2006, 17:56
Thank you


shoorick
i know, the code at the first page has this problem and the code the i have writen have te same problem.

rugxulo
thank you, i see wat i can do with the two orther pc's and freedos.

Tomasz Grysztar
thank you for this view of the code, i have test it and it works good.

i have the next code copy from you

Code:
format MZ
entry PSP:start

segment main
PSP = main - (100h shr 4)
org 100h

start:
(my code)

int 21h 
    


(int 21h have i al in my program)

its works good thank you.
i can now run the program and then type i <enter> and i go return to dos. Very Happy
Post 04 Dec 2006, 17:56
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 05 Dec 2006, 06:46
int 21h is way to dos functions. just "int 21h" is not enough, since function code is placed into ah, and other registers have to be filled depending on particular function.
to exit you have to place into ah code of terminate function (4Ch) and into al exit code (say, 0). this is doing usually with single command:

mov ax,4C00h
int 21h

to terminate COM program (not EXE!) you can use int 20h. com programs have size restriction to 64k, but they are more simple to learn.

if you wish your program will work under operatioin system you have to know how it works. search for the dos functions documentation to learn this. bios functions are also usable to get keyboard input and display output.
Post 05 Dec 2006, 06:46
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 05 Dec 2006, 07:39
shoorick wrote:
to terminate COM program (not EXE!) you can use int 20h.

This may have not been a best decision to speak about it in beginner's thread, however I already pointed out above, that whether you can use INT 20h or not isn't so simply determined by the type of executable you're using.
Well, you also do "jmp PSP:0".
Post 05 Dec 2006, 07:39
View user's profile Send private message Visit poster's website Reply with quote
zir_blazer



Joined: 05 Dec 2006
Posts: 66
zir_blazer 05 Dec 2006, 17:33
As I am also doing my first steps into Assembler for DOS (Well, at least on the WinNT DOS console), this is my "Hello World"...

Code:
org 256
mov ah,9
mov dx,mytext
int 21h
int 20h

label mytext
db 'Hello World in Assembler.$'    


I don't understand why the other codes posted are fairly more complex and sophisticated that this one. Tomasz Grysztar used "format MZ" and Cor used push/pop instructions, yet I don't really understand what are they purposes for this example.
Post 05 Dec 2006, 17:33
View user's profile Send private message MSN Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 05 Dec 2006, 17:48
My example was not aimed to be the one for beginners - it was addressed at Goplat's post. Sorry if you've got an idea that this is some elementary thing - in fact it requires a bit advanced knowledge to understand it.
Post 05 Dec 2006, 17:48
View user's profile Send private message Visit poster's website Reply with quote
Cor



Joined: 30 Nov 2006
Posts: 13
Location: Poederoijen, Netherlands
Cor 05 Dec 2006, 18:45
thank you,

zir_blazer wrote:
As I am also doing my first steps into Assembler for DOS (Well, at least on the WinNT DOS console), this is my "Hello World"...

Code:
org 256
mov ah,9
mov dx,mytext
int 21h
int 20h

label mytext
db 'Hello World in Assembler.$'    


I don't understand why the other codes posted are fairly more complex and sophisticated that this one. Tomasz Grysztar used "format MZ" and Cor used push/pop instructions, yet I don't really understand what are they purposes for this example.


Well, a am a beginner of assembler and i don't know its not need in a simply program. This code have i found. you know?
Post 05 Dec 2006, 18:45
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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.