flat assembler
Message board for the users of flat assembler.
Index
> DOS > Starting with assembler under dos Goto page Previous 1, 2 |
Author |
|
Cor 01 Dec 2006, 16:10
thank you, its a nice tutorial if i can see.
assembly is a nice program language |
|||
01 Dec 2006, 16:10 |
|
rugxulo 02 Dec 2006, 05:57
(bold means open source):
Finding a comfortable text editor is a very personal (and difficult) choice. Of this entire list, hopefully one is good enough! EDIT: "vi's modality may be hard on the brain, but Emacs is hard on the hand " -- Dave Kenny Last edited by rugxulo on 03 Apr 2008, 20:41; edited 34 times in total |
|||
02 Dec 2006, 05:57 |
|
Cor 02 Dec 2006, 08:24
thank you.
I have download pedit and its a nice program. 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. |
|||
02 Dec 2006, 08:24 |
|
rugxulo 02 Dec 2006, 22:23
Cor, no idea.
BUT, if your other computers need DOS to work, get FreeDOS (it's, uh, free ): 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 |
|||
02 Dec 2006, 22:23 |
|
shoorick 03 Dec 2006, 09:20
we can not help you without source of your not-working program
|
|||
03 Dec 2006, 09:20 |
|
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). How are you exiting? (The only way to properly terminate an EXE program is with int 21 function 4C.) |
|||
03 Dec 2006, 17:19 |
|
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. |
|||
03 Dec 2006, 17:29 |
|
Dex4u 03 Dec 2006, 22:56
Quote: PS. As for editors/IDEs in DOS, there's a small surprise coming soon. 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 . |
|||
03 Dec 2006, 22:56 |
|
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.
|
|||
04 Dec 2006, 07:30 |
|
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. |
|||
04 Dec 2006, 17:56 |
|
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. |
|||
05 Dec 2006, 06:46 |
|
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". |
|||
05 Dec 2006, 07:39 |
|
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. |
|||
05 Dec 2006, 17:33 |
|
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.
|
|||
05 Dec 2006, 17:48 |
|
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"... 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? |
|||
05 Dec 2006, 18:45 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.