flat assembler
Message board for the users of flat assembler.
Index
> DOS > 0x100/100h/$100 dos com file tips and tricks, post your Goto page 1, 2 Next |
Author |
|
Matrix 12 Feb 2005, 14:07
hy,
dos usually loads the com file to offset 256 of your segment, that org 256 100h 0x100 is to align your code on that offset |
|||
12 Feb 2005, 14:07 |
|
gumletis 12 Feb 2005, 14:44
i know there was 256(hidden console in windows - and com) but don't understand so much of what you say
_________________ LOOOL |
|||
12 Feb 2005, 14:44 |
|
Matrix 13 Feb 2005, 17:18
dos loads your com file to that address,
PSP is before it, 82h is command line parameters for example, its before your code, ds:82h so i guess you whould need a description of these addresses? Ralph Brown's interrupt list has some, if its not enough i could search my database for it if you'd like |
|||
13 Feb 2005, 17:18 |
|
gumletis 13 Feb 2005, 18:18
... yes thanks...
|
|||
13 Feb 2005, 18:18 |
|
Matrix 13 Feb 2005, 18:46
i give you a few links:
here is psp http://www.uv.tietgen.dk/staff/mlha/PC/Prog/asm/DOS/PSP.htm Memory Layout Overview http://www.pcguide.com/ref/ram/logicOverview-c.html Useful memory addresses http://www.sdconsult.no/linux/wine-doc/memory-addresses.html Low memory http://www.osdata.com/system/physical/lowmem.htm Basics of computer memory http://www.osdata.com/system/physical/memory.htm http://burks.bton.ac.uk/burks/pcinfo/hardware/bios_sg/memory.htm Art of Assembly Language: Chapter Eighteen http://webster.cs.ucr.edu/AoA/DOS/ch18/CH18-1.html Using Addresses and Pointers (pdf) http://web.sau.edu/LillisKevinM/csci240/masmdocs/programmersguide/07LMAPGC03.pdf Memory address Information http://www.searchspaniel.com/index.php/Memory_address for completeness i link here 2 search links: http://www.google.com/search?hl=en&q=dos+memory+addresses&meta= http://www.google.com/search?q=dos+reserved+memory+addresses+PSP&hl=en i have a txt somewhere with many reserved memory addresses, if i find it i'll post it |
|||
13 Feb 2005, 18:46 |
|
gumletis 13 Feb 2005, 20:08
lol, when i was looking in there i didn't expect so many sites thanks!
|
|||
13 Feb 2005, 20:08 |
|
Matrix 14 Feb 2005, 01:06
you're welcome, hope you find what you were looking for
|
|||
14 Feb 2005, 01:06 |
|
Bitdog 15 Feb 2005, 00:28
I'll try the same explaination, maybe it will be graspable?
DOS command.com loads info about your .COM in the first 256 bytes then loads your .COM program. Then, your .COM can access that info. Assembly language programmers often use HEX address, & here is some. MOV SI,80h ; command line input count address offset = 80h (DS=CS) LODSB ;AL now holds the command line input count, or ARGC which is ARGuement Count. CS:81h = the space after the .COM's basename and the command line input starts at CS:82h which is usually 128 bytes long or so? You can alter the data in the PSP such as command line input. Adding a zero where the 13=cr is will make an input file name an ASCIZ file name for loading the file There is other stuff in the PSP too, such as DTA? FIND FIRST & FIND NEXT file interrupts deliver the data to the PSP section at CS:158 decimal, or CS:0x9E (unless DTA address is changed.) Alot of memory is readable or writable if GS=0 MOV AL,[GS:449h] ;get current video mode into AL from BIOS data MOV EAX,[GS:0x046C] ;get tick counter = ticks since midnight 18 ticks per second (18.2 or something like that ? 18.2 hz) So you can make a timer. In the PSP you can jump to CS:0 to end the program.com RET ; does the same thing since the return address of CS:0 is loaded on the stack at startup You can move/copy the command line input to another memory location and parse it. (check it for parameters or alter it.) There is .COM PSP header address info available some where? I might have it at/in: http://bitdog.home.att.net/files/nasmenv.zip http://bitdog.home.att.net/files/fasmenv.zip named pspcom.txt in the HELP directory. good luck...... |
|||
15 Feb 2005, 00:28 |
|
gumletis 19 Feb 2005, 15:52
nice Bitdog, the zipped file, alot of learn
_________________ LOOOL |
|||
19 Feb 2005, 15:52 |
|
Bitdog 20 Feb 2005, 03:20
That should keep you buisy for a while, huh ????????
C:\fasm\inc16\ is full of simple includeable proc's to try/alter/use/abuse/etc You might try making your own environment (like mine) and use my stuff as a source. ie: look through my stuff & when you find some proc that you can figgure out & use, copy it to your own \INCLUDE\ directory/environment. That way your env is not full of my useless junk. The Fasmenv.zip is an old version. Sorry I didn't get a new version out this winter |
|||
20 Feb 2005, 03:20 |
|
gumletis 20 Feb 2005, 19:33
doesn't matter, good to learn of.. .Many interrupts
_________________ LOOOL |
|||
20 Feb 2005, 19:33 |
|
vid 21 Feb 2005, 00:35
gumletis: you would be fool to learn many interrupts. you will learn the often-used ones anyway just by coding, and you don't need to remember other ones, that's just waste of your memory-space. You need to learn how to find out them.
|
|||
21 Feb 2005, 00:35 |
|
gumletis 21 Feb 2005, 10:54
hmm, i've also, i know if i shall program a program that open and write or write, its some with 3D to 42 i need... so its just from there i do it... or that not what you mean?
|
|||
21 Feb 2005, 10:54 |
|
Matrix 03 Mar 2005, 16:03
hello
here you are, i have found the memory list while seperating 5GB data on my disk
Last edited by Matrix on 04 Mar 2005, 03:04; edited 1 time in total |
|||||||||||
03 Mar 2005, 16:03 |
|
gumletis 03 Mar 2005, 17:18
Thanks, can you please recompress it to zip? :p lol i know i only have zip decompressor
_________________ LOOOL |
|||
03 Mar 2005, 17:18 |
|
liteonish 03 Mar 2005, 20:15
_________________ I just own that much. |
|||
03 Mar 2005, 20:15 |
|
Matrix 04 Mar 2005, 03:19
Bitdog wrote: I'll try the same explaination, maybe it will be graspable? actually PIT is running at $1234DD Hz and you set the divisor for timer 1, and timer 2, 2 byte divisor latch gives you a maximum divisor of 2^16 = 65536, you divide $1234DD by 2^16 and get the divided frequency about = 18,2064971923828125 Hz you can use PIT for timing without reprogramming it, the way i mentioned before in other threads, like that simple PC speaker sound player i wrote, and the PIT delay it is using. it is a fairly accurate way of timing because PC has a quartz oscillator running at 14318172 Hz, (14.318172 MHz), which is divided by 12 to get $1234DD Hz = 1193181 Hz (1.193181 MHz) Code: oszcillátorok frekvenciái: f_decimál f_hexa 1 193 181 Hz 01234DDh PC PIT (Programmable Interval Timer) OPCC / 4 4 772 724 Hz 048D374h OPCC (Original PC' s cpu clock ) 14 318 172 Hz 0DA7A5Ch PIT x 12 (PIT Quartz) 115 200 Hz 01C200h BMAX (standard RS232 maximum baud rate) SSC / 16 1 843 200 Hz 01C2000h SSC (standard serial clock) SSQ / 6 11 059 200 Hz 0A8C000h SSQ (standard serial quartz) Values for serial port divisor latch registers: Some baudrates (using standard 1.8432 Mhz clock mj.:11.0592 MHz/6): baudrate divisor DLM DLL 12.5 9216 24h 00h 25 4608 12h 00h 50 2304 09h 00h 75 1536 06h 00h 110 1047 04h 17h 134,5 857 03h 59h 150 768 03h 00h 300 384 01h 80h 551.2 209 00h D1h 600 192 00h C0h 1200 96 00h 60h 1800 64 00h 40h 2000 58 00h 3Ah 2400 48 00h 30h 3600 32 00h 20h 4800 24 00h 18h 7200 16 00h 10h 9600 12 00h 0Ch 19200 6 00h 06h 38400 3 00h 03h 57600 2 00h 02h 115200 1 00h 01h SSQ/96 = SSQ/6/16 = SSC/16 |
|||
04 Mar 2005, 03:19 |
|
Bitdog 21 Apr 2005, 06:51
In Bitdog's fasmenv.zip there are file open, read, write, etc macro's in:
C:\FASM\INC16\ look for fopen.mac fread.mac fclose.mac etc they start with F for File (in previous post, you wanted file int stuff ?) |
|||
21 Apr 2005, 06:51 |
|
Picnic 09 Sep 2007, 18:42
Bitdog wrote:
Still is very useful Bitdog, a small treasure for Dos. I discover it yersteday. Bitdog wrote: full of simple includeable proc's to try/alter/use/abuse/etc very nice of you |
|||
09 Sep 2007, 18:42 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.