Message board for the users of flat assembler.
> OS Construction > SEA, systeme d'exploitation des adressages.
edfed 05 Apr 2006, 10:44
the begining of my os
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
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
Last edited by edfed on 17 Nov 2010, 00:12; edited 2 times in total
|05 Apr 2006, 10:44||
edfed 13 Apr 2006, 10:43
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
|13 Apr 2006, 10:43||
vid 08 Sep 2006, 08:23
going to OS-DEV
|08 Sep 2006, 08:23||
Dex4u 08 Sep 2006, 23:54
First go and read this tut http://www.geocities.com/siliconvalley/2072/atapi.htm
Also see the code for CdPod may help.
|08 Sep 2006, 23:54||
edfed 15 Oct 2007, 21:39
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!!!!
|15 Oct 2007, 21:39||
Dex4u 16 Oct 2007, 18:14
Welcome to the crazy club .
|16 Oct 2007, 18:14||
edfed 16 Oct 2007, 18:59
os dev is a good idea
all buffers in dynamic segment
segment pages linked to the hard disk
hard disk linked to the files
files linked into the file system
file system linked to the hard disk
it seem like a 2nd degree equation
who are a, b, c, x and y ?
oooo oooo oo oo oo oo oo ooo oo oo oo oo oo oooo oooo
|16 Oct 2007, 18:59||
edfed 28 Nov 2007, 16:30
les fonctions sont liées par leurs nom/nom de classe/nom de librairie.
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.
|28 Nov 2007, 16:30||
edfed 30 Nov 2007, 02:42
is my floppy drive dead? really dead?
putain de lecteur de disquette de merde
incapable de lancer bw0.com
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.
|30 Nov 2007, 02:42||
LocoDelAssembly 30 Nov 2007, 03:26
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:
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).
|30 Nov 2007, 03:26||
edfed 30 Nov 2007, 03:32
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.....
|30 Nov 2007, 03:32||
edfed 30 Nov 2007, 04:29
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'
|30 Nov 2007, 04:29||
edfed 01 Dec 2007, 18:21
the problem is still there
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.
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
make the same with bw0.4.zip
verify that bootwriter.com last byte is 0 (floppy drive)
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?
|01 Dec 2007, 18:21||
rhyno_dagreat 04 Dec 2007, 06:00
is my floppy drive dead? really dead?
No offense, it's kinda funny to see someone cuss out a piece of hardware in French.
|04 Dec 2007, 06:00||
edfed 04 Dec 2007, 23:58
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.
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.
|04 Dec 2007, 23:58||
rhyno_dagreat 05 Dec 2007, 04:41
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.
|05 Dec 2007, 04:41||
rhyno_dagreat 05 Dec 2007, 04:42
Oh, and if it's physically dead, as in broken... can't you just get a new floppy?
|05 Dec 2007, 04:42||
edfed 05 Dec 2007, 05:04
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
|05 Dec 2007, 05:04||
Dex4u 05 Dec 2007, 16:13
Its also possible to use USB fob for OS dev if your BIOS supports it.
|05 Dec 2007, 16:13||
edfed 05 Dec 2007, 16:37
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!
finally, the problem is half solved
here is the solution about a virtual floppy drive acces using a dos file.
|05 Dec 2007, 16:37||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.