Dex4U

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Dex4U

Post by Dex »

A 32/64bit, pmode/long, asm, floppy OS. http://www.dex4u.com/
User avatar
Daedalus
Member
Member
Posts: 74
Joined: Sun Oct 16, 2005 11:00 pm
Location: Australia
Contact:

Post by Daedalus »

Looks great! Truly good work there :)

I just wish I was better at assembly, but I'm more of a C man.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Thanks and You maybe in luck as standard library are on there way and some member have started C coding in Dex4u 8) .
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

that was probably me
and actually I haven't worked on it, AT ALL!

but now that you reminded me, I might try working on a SYSTEM library which will have all of the OS's special functions and might make a non-standard standard library(C99 is too much to worry about right now)

gonna start now since I'm quite bored

edit:
or maybe not!
The requested URL /DexSource.zip was not found on this server.

could you get that fixed
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

I was referring to "Exams, exams" here: http://collectivecyber.spaces.msn.com/P ... Space.aspx
Also the code is off line, as i am commenting it, as code without comment is useless.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

Well I'm attempting to convert that huge asm function table into a huge struct
and well thats really all I have info for right now except for the hello world included one the floppy

btw I love that you can compile stuff in your OS that is the coolest thing!
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

The fasm port was one of the easiest thing to do, as fasm is designed to be portable, so its fasm thats the coolest thing :wink:.
As for code the uncommented code is here:
Here is a link to uncommented Dex4u source.
http://www.dex4u.com/etc/DexSource.zip
Here is the commented MiniDos source, Dex4u will be commented like this, but theres lot of code to add comments to ;).
http://www.dex4u.com/etc/MiniDos.zip
NOTE: This source (Dex4u) as the fat12 code in that does not work with some emulators, but works fine on all real PC tested on, also if you assemble code in dex4u, the inc file etc, name can be no bigger than 8.3, as dex4u uses 8.3 file name's.

We also have a RetroForth port and Brainf*** ports
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

Your media player didn't work on my pc(yes I tested it on my PC)
it loaded all the music and stuff just no output to the speakers, I tried running AC97 since I have an AC97 sound card but it still didn't work


Another thing, about how far do you have it commented so far?

also what is extremely inconvinent is the little "Dex1" string requirement
is that enforced? because otherwise I'll have to create a tool just to add the string to a normal .bin file

edit:
btw I'm very gald you didn't use the stack or EBP in your function call table stuff, makes it tons easier for me

edit2:
CompearString
did you mean to write CompareString?

edit3:
CurrutDir
You meant CurrentDir right?
either way I'm writing it that way for me
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

The AC97 is not as easy as most people think, there,s loads of AC97 codex, but they are slight differant, eg: the intel is differant from the VIA etc to setup, if you run the code and it finds it, it should work, you all so need a CD to sound card cable, (most new PC do not have these any more, as XP does not use this meford to play CD).
These are the only ones that it test for
INTEL_VID equ 8086h ; Intel's PCI vendor ID
ICH_DID equ 2415h ; ICH device ID
ICH0_DID equ 2425h ; ICH0
ICH2_DID equ 2445h ; ICH2
Maybe one or two others.
The DEX1 is needed to make sure its a dex file.
As for the comments not far, i am busy with network code.
You all ways use earphones :wink: .

PS: This may interest you converted by 0x4e71 (sleepy mode)
Hacked TinyC, produces Dex4u executables:

http://4e71.org/dex4u/TCCDEX4U.ZIP

win32 binary only at the moment, but should compile under UNIX too (if I haven't messed it up too much)

As mentioned before, don't expect super optimal code because TCC is a simple compiler. However TCC has some really cool things:
1 - It is Compiler/Assembler/Linker all in one, no extra programs or temp files.
2 - It is very fast.
3 - It is a (relatively) small program

I especially like point 1, that it's always a plus point for me. Also it kind of fits the dex4u spirit I think ;)
Note that with some library work it shouldn't be too difficult to port the compiler itself to Dex4u!

And now, of course, a bit of README :-)

USAGE
The usual syntax: tcc bla.c
Will produce bla.dex, a ready to run dex4u executables.
Note that Dex4u requires some initialization work in order
to call system functions etc. Look in the TEST directory for
examples.
Note:
- I broke BSS, so do NOT leave globals uninitialized,
Example:
long z; /* BAD! */
long z=0; /* GOOD */
This does not apply to locals
- The entry point starts is exactly the first of your program,
so look at one of the tests for the snippet of assembly code
to put on top of your source code.
- It is all alpha quality, so be careful.
- There is no clib for it, any function you want you have to either write or paste it
into your source code.
0x4e71 done a great job 8).

EDIT
See here: http://akma.disseminary.org/archives/001548.html
and you will find this
I know some brilliant programmers and insightful geeks who are dyslexic and spell very poorly -- making fun of someone's spelling online is a lot like making fun of someone's speech-impediment. Sometimes it turns out to be an affectation, sometimes it turns out that you're making sport of someone with a cleft palette. So stop being pedantic dorks, all right?
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

I really prefer to use codeblocks which supports the all famous GCC(I'm sure I could configure it to support tinyC also though)

I have all of the function table conversion done!

I'll also try to make a convertor to convert .bin to .dex
but really all it will do is add the Dex1 string or well, don't know how to jmp to main then though

guess I'll try making a macro type thing in a custom include file that will have some asm stuff in it to do everything


anyway...

you have yahoo, or msn, or any other im?
I have the feeling I'm gonna need to know what some of this does

oh and on the DeleteFile and DeleteFile1 you said DeleteFile1 is simpler, but they both take the same thing so whats the difference?

and Dex runs applications in Ring3 right?
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

The differance is one deletes, a file and the other deletes and save a file of the same name,
eg: say you open a text file call "test.txt" in a text editor, write some more to it, it will delete the old "text.txt"and write the new test.txt, but it also check that it will fit it on the disk, or you could end up with the old file deleted and the new file not fiting on disk.
I do not use MSN or any thing like that.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

ok then I'll PM you then

also which deletefile will basically overwrite the file and which one just deletes it

edit:
Do you not have some sort of memory allocation function?

[edited out some stuff]
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

This stupid 'DEX1' is getting extremely annoying because C is a frikkin arse at havign a format in the code
you tell it to link this first and it links it in a random order

and then even if you have the code in the startup file with the highest priority there is still some mysterious 20 bytes of nop opcodes which makes no sense!

edit:
I keep having problems, dosbox keeps saying illeagel reads
just using this basic code(\n means newline)

Code: Select all

"jmp skip_it\n" ;this compiles to 0xEB, 0x04 which is correct according to your hello.dex
"nop\nnop\nnop\nnop\n" ;I replace these dummies with DEX1
"skip_it:\n"
"hlt\n"

edit2:
lmao! appearntly floppies are the most incorrectly emulated device because cd works(not able to test cd2 on emulation)
now gonna try downloading your iso version to see if it will be emulated properly

gonna test it on hdd stuff now!


edit3:
The iso version of Dex4u runs on microsoft virtual pc!!!
and the gui runs awesome!!! almost as fast as on my pc
The media players considerably slower though(and it never stops!!)
but yea this is great!
also reading from cd is considerably slower(of course this might just be vpc though)
now I just need to test hdd and find a program that can make .iso files real quick(for deving purposes because dosbox is horrible to me)

hdd does not work(isn't it because you don't have fat16 yet?)
and fdd still doesn't work

edit4:
your forum link is down
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

The forum link seems to work ok, maybe it was being updated at the time etc.
You may have link to our old forum, link to new at bottom of topic.
as for the "Dex1" i think only CD load checks for it, not floppy :?,
You need fat32 for HDD to work.
As for memory management, you do not need it as such, as it works like this
First you can load modules (for drivers etc), when one is loaded it finds top of memory (ram) takes size of module off top of memory and this will be the new top of memory, all modules are load to top of memory, you can add more modules till run out of memory, you can also unload modules (not done yet).
Then comes user programs cli programs are loaded to 2MB and you can use all memory from 2MB to top of memory, (eg: if no modules are loaded and you have 128mb, your program can use from 2mb to 128mb) Gui programs are loaded to 8mb and can use from 8mb to top of memory.
The differance from a cli and a gui program are, the cli will loaded in text mode and the gui will be loaded in vesa 640x480 32bpp mode.
http://jas2o.forthworks.com/dexforum/index.php

PS: the programs run in ring0 pmode (like a 32bit pmode dos).
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

yea forum is working now(going to join now)
and the floppy checks for dex1 also
You need fat32 for HDD to work.
what do you mean, do you mean you need to develop fat32 or you need to have the hdd formated with fat32?

as for memory management,
so is ds:200000 the top of the memory like cs?
and can I use that top 2 gb freely(nothing automatically loaded by the kernel or anything like that)

because for C I have to have malloc(size) which is used as a dynamic bss(usually anyway)
Post Reply