flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
Matrix 06 Nov 2004, 19:24
i recently wrote some functions using bios to access hadr disks,
here goes, its not completed as you seee some functions are under interpretation. hope it helps if you got problems with bios routines.
|
|||||||||||
![]() |
|
joachim_neu 07 Nov 2004, 00:13
no, I think, I set all the parameter of the BIOS-Ints right... But I don't know the differenz beetween the first running of the Code, and the second.
|
|||
![]() |
|
ASHLEY4 07 Nov 2004, 04:08
Here is what i think.
1. write sector needs to be tryed 3 times, so you must try 3 writes. but you do it only once, if it does not work by the third time read ah, error status. The best way is read/write a sector at a time, inc sector and loop, check for sector is more than 18, if so make sector 1, also check if head is 0 or 1, if 0 then inc, if 1 dec and add 1 to track. Read/write sector's can only be done if all sectors are on one track. As i remember CL = start sector number, AL = number of sectors, up to a max for a track. So by starting at sector 7 and doing 13 sectors = 20, only 18 sectors on a track. But i would try it on a real pc, bochs is not too good with emulating these things. \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
![]() |
|
Matrix 07 Nov 2004, 12:08
And in my opinion, if sector reading on hard disk is not error less the first time, i whould set the bad sector flag
![]() as well as on floppy of course user should be warned about this, and sector should be read retry times again, to make sure data is lost there. when you're reading/writing more drives, you must issue the disk reset function each time changing drive, ( if i didn't do this data written from floppy to other floppy was 00 ) as well as first tme accessing the drive, you must issue disk reset command. i have already used int 13h bios functions to raw read / write my 850 MB harddisk sectors, and it was completely working backup mirror of my drive's data, i could reload it and boot the drive. |
|||
![]() |
|
joachim_neu 07 Nov 2004, 12:48
ok,
i put a 10-times-loop around my write-part, and a reset-command before it. there is still the problem! it still works only after the second time executing it. there is no error-code! |
|||
![]() |
|
joachim_neu 07 Nov 2004, 12:50
ps: and i don't want to write a sector, which doesn't exist!!!
|
|||
![]() |
|
Matrix 07 Nov 2004, 14:00
why do you wanna get ds back from data segment indexed variable?
Code: mov ds,[tds] your code is a little unclear to me, but hope someone can help you. however i saw this code: Code:
write_name_loop:
lodsb
stosb
loop write_name_loop
i know this is not a problem in general, but i'd suggest to use this instead: Code: rep movsb |
|||
![]() |
|
joachim_neu 07 Nov 2004, 15:17
@matrix: you're right, your idea is bether to copy the name. the
mov ds,[tds] is, to save also the ds-register of the coordinates to write or read into the filelist. |
|||
![]() |
|
ASHLEY4 07 Nov 2004, 16:16
Have you try a real pc yet, bochs does things that real pc do not, like waiting for a int from commands, that do not need a int on a real pc, i have just written a pmode floppy driver for my OS and lots of people have trouble on bochs, but there code works fine on a real pc, i have not tyred my floppy on bochs, but if it works on bochs, i will after work on it some more
![]() If it still does not work on a real pc, try duping some regs etc, to see the difference between the first and second run or is that not what bochs is for. \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
![]() |
|
joachim_neu 07 Nov 2004, 18:25
i'l test it!
|
|||
![]() |
|
joachim_neu 09 Nov 2004, 13:26
now i have an other problem!!! it doesn't work in real!!! i think, it's because some sectors are broken, because every file-function doesn't work!!! i'll copy it on an other floppy, maybe there it works!
|
|||
![]() |
|
joachim_neu 09 Nov 2004, 19:33
well, after I implemented an error-output for my OS, now I know the misstake in running on the real PC. it's because he can't read the sector!!! that's absolutely unable! all the parameters are right! might it be, because there could be an broke sector? if I format the floppy, there comes, that 3 sectors are broken. might it be one of that 18 sectors? what do you think? what should I do?
|
|||
![]() |
|
Matrix 09 Nov 2004, 19:46
i don't know
![]() i use CD-R s instead of floppies, then i throw them away when i don't need them anymore. i hate floppies, especilly when they destroy my important data. |
|||
![]() |
|
ASHLEY4 09 Nov 2004, 20:37
Try another floppy disk, format it first to see that all sector are OK, then try again,
PS: You many not have a good FS, but look on the bright side, you may have a very good file shredder ![]() \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
![]() |
|
joachim_neu 11 Nov 2004, 13:22
right, my FS isn't very good! it's constructed very simple, because I don't understand Fat and so on... @Matrix: always writing a new CD is also bad and expensive, and there I need an other bootsector and a driver, right?
|
|||
![]() |
|
Matrix 11 Nov 2004, 14:12
No,
i can make botcd with floppy disk emulation, with nero, or easycd creator, you just select image file and software writes it on, well, there are CD-RW disks, that can be formmatted many times, and made a boot floppy again ![]() CD-R s aren't tthat expensive, and if i use it as data storage for ex.:16 MB, then i can write again a few times replacing or adding data. |
|||
![]() |
|
joachim_neu 11 Nov 2004, 16:12
that's right! I didn't calculate the replacings... But don't I need an special CD-driver? With CD-RW it's very good, but you talked about CD-Rs, so I did'nt calculate them, too...
|
|||
![]() |
|
Matrix 11 Nov 2004, 16:24
later bioses for example a bios on a Pentium I, supports boot from cd function, and then the CD or CD-RW will emulate an A: drive with 1.44MB, then youcan do whatever on your new A: drive, its fully compatible, loads @7c00h, or you can specify another location to nero for example
![]() |
|||
![]() |
|
joachim_neu 11 Nov 2004, 16:57
thank you for the information.
|
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.