flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Dex4u fasm code

Author
Thread Post new topic Reply to topic
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 06 Apr 2005, 16:03
I have decided to release the fasm code for "Dex4u" it is a 32bit pmode OS with drivers for pmode floppy and Atapi (CD/DVD), vesa, loads programs, fat12 etc.
May be some help to people making there own OS.



The web site and forum for "Dex4u" is here: http://falconrybells.co.uk/
http://dex.7.forumer.com/

Note: Dex4u fasm code has been removed, as is being added to web site.


Last edited by Dex4u on 21 Jun 2005, 20:57; edited 3 times in total
Post 06 Apr 2005, 16:03
View user's profile Send private message Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 06 Apr 2005, 19:42
thank you!
Post 06 Apr 2005, 19:42
View user's profile Send private message Visit poster's website Reply with quote
JMD



Joined: 24 Sep 2003
Posts: 32
JMD 08 Apr 2005, 06:56
hmm FDD.inc is hardcoded to 1.44MB floppy:( wouldnt you want the driver to read the disk geometry from sector 1 and use that data from the disk when reading/writing. Is floppy write implemented? would you mind elborating on the use of both atapi and fdd driver, as in what process i would go through to read so many sectors from a floppy..... reset first, call read command, etc.etc.
Post 08 Apr 2005, 06:56
View user's profile Send private message Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 08 Apr 2005, 11:30
You have the code, change it to your own tastes. You wanna read sector 1 for geometry, do it. The procedures are there...all you need to do is re-write the code to be dynamic for your purposes. Can't you do that?
Post 08 Apr 2005, 11:30
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 08 Apr 2005, 16:52
The trouble, with people who start making OS is they try to make things to complected, i like things to be done the KISS way, the fact that i have not used any floppy disk other that a 1.44MB, is why i chose to hardcode the floppy driver to 1.44MB, you may find that you need other disk sizer, if so add it to the code, post the new code with the mods, so other can use it.

Here is the info, for reading 1 sector, just fill in the regs and call the function "FddRead"
Code:
 ;----------------------------------------------------; ; Fdd read                                           ; ;----------------------------------------------------; ;                                                    ; ;   Input:                                           ; ;          CH  = Track/cylinder                      ; ;          CL  = Sector                              ; ;          DH  = Head                                ; ;          DL  = Drive (only A: drive used 00 )      ; ;                                                    ; ;  Output:                                           ; ;          AH  = Status                              ; ;          AL  = Sector number read                  ; ;          CF  = 0 If successful                     ; ;              = 1 If error                          ; ;                                             (100%) ; ;....................................................;    


You would call the floppy drive some thing like this, if you wanted to read number of sectors.
Code:
        call  FddReSet        call  FddRecalibrate; first time you call floppy call the above;after that you can just call "FddRead" unles error.        xor   ax,ax        mov   dh,01           ;side 01        mov   dl,00           ;drive        mov   ch,01           ;track         mov   cl,03           ;cl Sector        call  FddRead        jc    @F;Do some thing here; the above code will fill the dma buffer with 512bytes; just dump it to screen, you will needed to set floppy int and; timer int, into the fdd.inc .@@:        mov   si,FloppyErrorMsg        call  print_string    


NOTE: You should also retry the above three times on error.


Last edited by Dex4u on 09 Apr 2005, 15:07; edited 1 time in total
Post 08 Apr 2005, 16:52
View user's profile Send private message Reply with quote
JMD



Joined: 24 Sep 2003
Posts: 32
JMD 09 Apr 2005, 06:00
thank you for the responce Dex4u, excellent code btw. dont see a write routine tho, guess that hasnt been implemented yet. But thank you for the contribution and i like the structured coding style, makes it easier to read then most code i run accross.
Post 09 Apr 2005, 06:00
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 09 Apr 2005, 15:06
Thanks JMD, your right i have not implemented the write routine yet, but the only difference between the read and write function is the command number and the DMA, so most people have the same function for read/write, but check for a number in a reg and then call the read or write command.

PS: You can test the floppy or CD driver by down loading the the "Dex.zip" from here: http://falconrybells.co.uk/
or you can run kernel32.exe from pure Dos.

Below is a screenshot of Dex4u's Gui (in the making).


Description:
Filesize: 5.37 KB
Viewed: 9746 Time(s)

gui_s.png




Last edited by Dex4u on 16 Apr 2005, 21:15; edited 1 time in total
Post 09 Apr 2005, 15:06
View user's profile Send private message Reply with quote
franz79



Joined: 13 Jul 2004
Posts: 11
Location: POLAND
franz79 12 Apr 2005, 08:29
Can you send my source code of yours os ...
on web page i can't find
Post 12 Apr 2005, 08:29
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 13 Apr 2005, 16:33
It will be on the web site by the weekend Smile.
Post 13 Apr 2005, 16:33
View user's profile Send private message Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 13 Apr 2005, 18:23
Nice code ASHLEY4. Wink
Post 13 Apr 2005, 18:23
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 13 Apr 2005, 18:57
@smiddy, I thought "ASHLEY4" was a girl Laughing, did you get the OS source code ?.
Post 13 Apr 2005, 18:57
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.