flat assembler
Message board for the users of flat assembler.

Index > OS Construction > SEA, systeme d'exploitation des adressages.

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
the begining of my os
Code:
        org 100h
include 'mode13h.inc'
root=2
        mov ax,05000h
        mov gs,ax
        mov al,0
        mov di,0
@@:
        mov [gs:di],al
        inc di
        jne @b
        mov [curdir],sectorfield
        mov [cursector],fieldsector
        call copysector
        mov [curdir],rootdir
        mov [cursector],root
        call copydir
        mov [curdir],asmdir
        mov [cursector],3
        call copydir
        mov [cursector],root
        mov [curdir],rootdir
        mov ax,05000h
        mov [dirseg],ax
        mov gs,ax
        mov eax,'root'
        mov [gs:0],eax
        mov byte[gs:4],'/'
        mov byte[gs:5],0
        mov [typeptr],5
        mov [color1],48
        mov [colorclear],16
        mov [datatype],4
        jmp debut
typetime0=15
typetime1=2
include 'cursor.inc'
include 'typematic.inc'
include 'khdle.inc'
include 'displaing.inc'
include 'hextoascii.inc'
include 'mouse.inc'
include 'pointeur.inc'
include 'putbitmap.inc'
include 'text.inc'
include 'chr$.inc'
include 'refresh.inc'
include 'scancode.inc'
include 'diskrw.inc'
include 'explore.inc'
include 'copydir.inc'
include 'interpret.inc'
include 'misc.inc'
include 'scanfree.inc'
include 'sectorfield.inc'
include 'comtable.inc'
include 'asciitoval.inc'
currentfolder dw 07000h
size db 'size=',0
location db 'location=',0
curdirtxt db 'root/',0
;curdir dd sectorfield
mouse? dd 0
debut:
        call mouse
        cmp [curcode],key.entrée
        jne @f
        call interpret
        cmp [curcode],key.echap
        je @f
        mov [curcode],key.rien
@@:
        call command
        call explore
        mov eax,[curs.x]
        mov ebx,[curs.y]
        mov [put.x],eax
        mov [put.y],ebx
        mov esi,pointeur
        call put
        call refresh_clear
        cmp [curcode],key.echap
        je exit
        mov ax,0c00h
        int 21h
        in al,60h
        mov [curcode],al
        jmp debut
exit:
        mov ax,3
        int 10h
        int 20h
rootdir:
.size dd .end-.size-4
.fil00:
db 'asmx86',0,0,0,0,0,0,0,0,0,0
dd asmdir.end-asmdir
dd 00000003h
.fil01:
db 'typematic',0,0,0,0,0,0,0
dd 0
dd 00000004h
.fil02:
db '3d prossessing',0,0
dd 0
dd 00000005h
.fil03:
db '3dengine.com',0,0,0,0
dd 0
dd 00000006h
.fil04:
db 'drag n move',0,0,0,0,0
dd 0
dd 00000007h
.fil05:
db 'explorer.asm',0,0,0,0
dd 0
dd 00000008h
.fil06:
db 'mouse.inc',0,0,0,0,0,0,0
dd 0
dd 00000009h
.fil07:
db 'mode13h.inc',0,0,0,0,0
dd 0
dd 0000000ah
.fil08:
db 'scancode.inc',0,0,0,0
dd 0
dd 0000000bh
.fil09:
db 'refresh.inc',0,0,0,0,0
dd 0
dd 0000000ch
.end:

asmdir:
.size dd .end-.size-4
.fil00:
db '3dpross',0,0,0,0,0,0,0,0,0
dd 0
dd 00000002h
db 'asm',0,0,0,0,0,0,0,0,0,0,0,0,0
dd 0
dd 00000003h
.end:
    






it needs a primary slave
the hard disk cannot be used if the program write on it
this program only test some disk operations algorythms and command line operations
it can launch a programm by using the name or a preestablished function name

the avaibles function names are
exit,quit,x,q

mouse,m

scan,s

new,n

path,p

backspace+ctrl erase the previous word

enter to execute the interpret

note that it work if you haven't a primary slave because it use the bios functions int13h,2 and 3


Description: if you use WINXP say ignore in the dialog box about the disk operations but it will not work, needs a dos with disk i/o permittions like win98.
Download
Filename: interpret.zip
Filesize: 26.73 KB
Downloaded: 125 Time(s)


_________________
Smile fool iem.design


Last edited by edfed on 17 Nov 2010, 00:12; edited 2 times in total
Post 05 Apr 2006, 10:44
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
hi
i am now in the formating phase of my project
but a problem
the bios int 13h are limited and unusefull
so i decide to write my disk handler
the big problem is how can i know the ports addresses of my hard disks without bios functions and automaticaly

second problem, with the pio mode, i tryed to read the device id field of the drives and nothing was coherent , i need to know the manner to read the disk ports

third problem, the lba and chs mixing with transparency
for hard drives who don't support lba i create a virtual lba who is calculated by the µP and not by the controller but to create virtual lba i need to know the drive parameters

the project is now capable of create new entries in the directories files
but theses entries aren't accessibles because of formating less of my drive


the future advantage of my os is the natural capability of file recovering and automatic unfragmentation

if a file need to be written on less than or equal to a track, it search autiomaticaly the free track to write this

and if a file cannot be saved anywhere else than a cross of track, the defrag is launched

good lunch
Post 13 Apr 2006, 10:43
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
going to OS-DEV
Post 08 Sep 2006, 08:23
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
First go and read this tut http://www.geocities.com/siliconvalley/2072/atapi.htm
Also see the code for CdPod may help.
Post 08 Sep 2006, 23:54
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
frankly

coding an os is very very hard

and the coding of an os alone is really a crazy idea

i am crazy so i continue

rendez vous in 2008 for a test version!!!!

_________________
Smile fool iem.design
Post 15 Oct 2007, 21:39
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Welcome to the crazy club Smile .
Post 16 Oct 2007, 18:14
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
os dev is a good idea Wink

aide memoire

all buffers in dynamic segment
segment pages linked to the hard disk
hard disk linked to the files
Neutral
files linked into the file system
file system linked to the hard disk
ouch!!!!
it seem like a 2nd degree equation

y=ax²+bx+c

ouch

delta=b²-4ac?

who are a, b, c, x and y ?
Code:
     oooo     oooo
   oo   oo   oo   oo
   oo     ooo      oo
   oo   oo   oo   oo
     oooo      oooo
    
Post 16 Oct 2007, 18:59
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
aide memoire:
les fonctions sont liées par leurs nom/nom de classe/nom de librairie.
au choix.
l'inclusion de fonctions dediées est aussi permise, uniquement en asm.
les autres languages n'auront que les fonctions permises par ces languages.
les RING sont utilisés pour limiter les acces a certaines librairies.
par exemple, un programme ne peu pas call une int. come il ne pourra pas call une fonction purement syteme.
comme l'écriture directe sur disques.
sinon, l'ecriture directe sur ecran, ports et autres devront etre mises sur liste d'attente.
l'asm aura tout les droits
les fonctions venantes des librairies seront plus limitées
une fonction definie en ring3 ne pourra pas appeler directement une fonction de ring 0,1,2. pour cela elle devra passer par un gardien.
ça ralentira le systeme et c'est pour ça qu'il faut definir un maximum de fonctions en asm pur.
au boulot mister. allez assez causé.
putain ferme ta gueule et passe a l'action merde.
Post 28 Nov 2007, 16:30
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
is my floppy drive dead? really dead?
putain de lecteur de disquette de merde
incapable de lancer bw0.com
fait chier.
bon je vais le tester depuis mon autre pc.
et le transferer en passant par fasm.
voilà. c'est dit.

if someone can say to me if it works, or don't, it's good.

Finally it works.
to the ones who download it, please don't steal my code style.
use it but don't say it's your style.
it's my baby.
i know it's not a great code for the moment. but let me devellop it.


Description: if it don't works, it's normal.
if it works, don't look too long the screen or you'll become crazy... ;-)

Download
Filename: SEA.zip
Filesize: 14.7 KB
Downloaded: 128 Time(s)


_________________
Smile fool iem.design
Post 30 Nov 2007, 02:42
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
The bitch diskette reader of shit is not dead (unless it really can't read/write with anything).

Check http://www.ctyme.com/intr/rb-0608.htm . You need to retry at least three times (and using Int13/00 between attempts). In my experience not actually needed when you run under windows9x (and maybe XP, I'm not sure at this moment :S), but on DOS or at boot loader stage you need to do this.

BTW, if the proc is this:
Code:
proc sub_10489 near
mov     al, [byte_104B9]
mov     cx, [word_104BB]
mov     bl, cl
mov     cl, ch
mov     ch, cl
shl     cl, 6
and     cl, 0C0h
or      cl, [byte_104BA]
mov     dh, [byte_104BD]
mov     dl, [byte_104C2]
mov     bx, [word_104BE]
push    es
mov     es, bx
assume es:nothing
mov     bx, [word_104C0]
mov     ah, 3
int     13h             ; DISK - WRITE SECTORS FROM MEMORY
                        ; AL = number of sectors to write, CH = track, CL = sector
                        ; DH = head, DL = drive, ES:BX -> buffer
                        ; Return: CF set on error, AH = status, AL = number of sectors written
pop     es
retn
endp sub_10489
    


Then please post code of bw0.com since there are wierd things at this proc and according to IDA, word_104BB is only refered once so seems that it is never initialized (perhaps a more carefull analysis proof otherwise but no time to do it now).
Post 30 Nov 2007, 03:26
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
code posted at heap/goodpackage.

at least three times. i never made this. if it don't works, i try again.
ok. i'll modify it. everybody is against me..... Wink
Post 30 Nov 2007, 03:32
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
finally it works.
one really strange thing. i was editing it on machine 1 and doesn't work.
so i edit it on machine 2, it works.
i transfert it with this board, and it finally works on 1 & 2.
the code was always the same. on 1 & 2 it was strictlly the same code.
on 1, i must hit enter and finally obtain error.
on 2 it was the same. the file was edited from a save folder. it doesn't work. edited from original folder, it works.
i delete all folders referencing to this non working code, recreate all this, and finally all goes well.
very strange, my brain is burnin'


Description:
Download
Filename: bw0[1].4.zip
Filesize: 6.81 KB
Downloaded: 98 Time(s)

Post 30 Nov 2007, 04:29
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
the problem is still there

i explain:
my bootwriter.com works if it is in bw0.4/
but when i make a copy to sea/ it doesn't works.
more, it waits i to hit enter to start and returns an error.

why?
it makes me feel idiot.
someone can try please?
you need to make this to share my test conditions.

download sea.zip in the desktop/ folder
c:\windows\desktop\sea\
make the same with bw0[1].4.zip
c:\windows\desktop\bw0[1].4\
verify that bootwriter.com last byte is 0 (floppy drive)
launch it
normally it works.
copy bootwriter into sea/ and launch it, normally it doesn't works.
very very strange bug.
my os is win98 first edition, is there some thing i don't know?
Post 01 Dec 2007, 18:21
View user's profile Send private message Visit poster's website Reply with quote
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat
edfed wrote:
is my floppy drive dead? really dead?
putain de lecteur de disquette de merde
incapable de lancer bw0.com
fait chier.
bon je vais le tester depuis mon autre pc.
et le transferer en passant par fasm.
voilà. c'est dit.

if someone can say to me if it works, or don't, it's good.

Finally it works.
to the ones who download it, please don't steal my code style.
use it but don't say it's your style.
it's my baby.
i know it's not a great code for the moment. but let me devellop it.


No offense, it's kinda funny to see someone cuss out a piece of hardware in French. Laughing
Post 04 Dec 2007, 06:00
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
yeah , i know.
all americans i know told me the same.

like "putain de sa race". one of them was always repeating me.
poutain d' sa wass, poutain d' sa wass.

but, concretelly, have you got an idea on how to use dead floppies with int 13h?

i need an other point of view on my file system sercives.
like:
format drive.
create file. file type, where to reserve sectrors?
open file??? i doubt it really needed.
read file. how many bytes from offset?
erase file. delete all sectors or just the references in FS?

and a very important thing, thge sector occupation bitmap; 1 for each individual tracks or, 1 for the full drive?
track's sector bitmap + global tracks bitmap or, just track's sector bitmap?
there are a lot of possibilities. the problem is to find the best before coding anything, cause, ones the project is advanced, it's more complicated to change the little details.
Post 04 Dec 2007, 23:58
View user's profile Send private message Visit poster's website Reply with quote
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat
By dead floppies do you mean dead harware wise or just not formatted correctly? if it's not formatted, then it's a simple task of writing the FAT headers to the bootsector, the 2 FATs and root dir to the second sector.
Post 05 Dec 2007, 04:41
View user's profile Send private message Reply with quote
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat
Oh, and if it's physically dead, as in broken... can't you just get a new floppy?
Post 05 Dec 2007, 04:42
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
phisically dead, but there are hidden bad sector flag used by bios.
where are they physically? it's a good question.

floppy is out but as it's a very backward compatible thing, it's good to use it for OS dev
Post 05 Dec 2007, 05:04
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Its also possible to use USB fob for OS dev if your BIOS supports it.
Post 05 Dec 2007, 16:13
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4226
Location: 2018
edfed
is it possible to modify the BIOS INT 13h of old PCs?

all my computers have usb ports, but they do not support USB drive.

if i flash the BIOS then it's possible to BOOT on USB!

[edit]
finally, the problem is half solved

here is the solution about a virtual floppy drive acces using a dos file.
http://board.flatassembler.net/topic.php?p=122778#122778
Post 05 Dec 2007, 16:37
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar.

Powered by rwasa.