flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > int 19h Goto page 1, 2 Next |
Author |
|
edfed 12 Jan 2008, 02:46
why doesn't it work?
Code: org 100h mov dl,80h int 19h |
|||
12 Jan 2008, 02:46 |
|
edfed 12 Jan 2008, 02:59
i tried from pure dos, hem, not sure in fact, there is the dpmi extender, and it don't work at all...
i've turned it in all directions, and made an int13h based version, don't work too. |
|||
12 Jan 2008, 02:59 |
|
edfed 12 Jan 2008, 03:07
even in pure dos, it don't work it restart constantly from floppy.
and 13h version don't work at all. |
|||
12 Jan 2008, 03:07 |
|
sinsi 12 Jan 2008, 03:30
INT 19h is the bootstrap loader i.e. reboot the system, same as ctrl-alt-del
|
|||
12 Jan 2008, 03:30 |
|
edfed 12 Jan 2008, 03:38
how can i boot from a choiced drive after main boot?
simply load the desired boot sector and jump to it seems to be useless... why? in theory it's ok, but not in practice. |
|||
12 Jan 2008, 03:38 |
|
Japheth 12 Jan 2008, 08:15
int 19h is not the same as ctrl-alt-del. It just restarts the last part of the BIOS boot process, that is, loading a boot sector and transfer control to the code in it.
Usually, in DOS, you cannot run int 19h, because very likely some TSR programs have changed vectors in the IVT, and the IVT is not reinitialized by Int 19h. Also, the "extended BIOS data area" (XBDA) might have been moved to another place and has to be restored to its original place. A DOS device driver, loaded very early in CONFIG.SYS, can make Int 19h work, however. See Jemm's FASTBOOT option http://www.japheth.de/Jemm.html. |
|||
12 Jan 2008, 08:15 |
|
sinsi 12 Jan 2008, 08:36
yeah I know, but just trying to simplify things...
There was a format program back in the late 80's that would put a boot sector on a floppy, so that if you left it in your 286 fdd it would boot from a hard drive. |
|||
12 Jan 2008, 08:36 |
|
Vov4ik 12 Jan 2008, 09:03
Yes, boot sector, which can start system from HDD exists. FFORMAT is a good program, it is able to put various boot sectors on FDD and do other useful things.
But load system from first HDD is quite easy, because MBR loads system always from disk number 80h. To load system from other HDD than primary master, BIOS reassigns logical numbers so that necessary HDD became first i.e. 80h. Then bootstrap loader loads MBR from 80h HDD and runs it. So, if you need to start system from non-primary HDD, you should write a stub to interrupt 13h, which interchanges desired disk (for example 82h) and disk 80h. Then, when you call bootstrap, system starts from 82h disk. A stub must be placed in high memory, and amount of system memory, reported by BIOS, must be decreased (as in old good boot viruses so as DOS couldn't write smth over you int13 handler and system didn't hang. |
|||
12 Jan 2008, 09:03 |
|
sinsi 12 Jan 2008, 10:47
No need for re-assigning drive numbers - the standard boot sector looks on drive 80h, but change the byte to 81h and boot from hdd2 - of course, DOS for example will assume it's on C: (drive 80h) and things screw up, but if it's your code then it's ok.
|
|||
12 Jan 2008, 10:47 |
|
edfed 12 Jan 2008, 14:07
the question is simple....
how to boot from an alt drive while runing dos? i start system from floppy (0h) and then, without reboot, i want to start the system in an other drive (80h, 81h, 82h...) but IT DON'T works at all... i've tryed in various designs, with int19h, it just reboot the system from original boot drive.. with int13h, it simply halt the system.... somebody can give me some GOOD ideas? and not only program names? |
|||
12 Jan 2008, 14:07 |
|
Vov4ik 12 Jan 2008, 14:28
Read my previous post. Intercept int13, and, before executing an original handler, interchange drive number 80h and your desired boot drive. This stub must handle all read, write, format and other functions which takes disk number as one of parameters.
|
|||
12 Jan 2008, 14:28 |
|
edfed 12 Jan 2008, 14:43
don't work.
|
|||
12 Jan 2008, 14:43 |
|
edfed 12 Jan 2008, 15:12
one starnge phenomenon, if i make this from win98 system dos, on a floppy, it don't works.
but from no dos, only a simple bootlader on my floppy, then it's ok with int13h somebody have an hypothesis? |
|||
12 Jan 2008, 15:12 |
|
Vov4ik 12 Jan 2008, 15:32
DOS and programs, loaded after it, overwrites your code in memory. You should place it, where it will not be overwrited. It may be a reserved memory area, or monochrome video memory. Try to look at DOS memory map and find appropriate regions.
|
|||
12 Jan 2008, 15:32 |
|
edfed 12 Jan 2008, 16:18
i've tryed to load it in various locations, but it don't work from the win98 dos, the one we have if we make the sys copy on a floppy.
|
|||
12 Jan 2008, 16:18 |
|
zhak 12 Jan 2008, 21:23
are you sure INT 19h can accept parameter in DL register? There's nothing about it neither in BIOS Boot Specification, nor in Ralph Brown's INTs list. I didn't try it by myself, so I cannot say for sure. But this is what documentation says. It seems that you simply cannot pass the BIOS Drive Number in DL to INT 19h.
|
|||
12 Jan 2008, 21:23 |
|
edfed 12 Jan 2008, 21:36
i've read this in the helppc documentation, tryed it and yes, int19h don't access parameters.
it's an error from david jurgens Code: org 100h mov ax,201h mov bx,7c0h mov cx,1 mov dx,80h push bx xor bx,bx pop es int 13h jmp 0:7c00h this code works, but not if dos runs... the problem is to make it work during dos execution. for exemple with a command line: a:\> hdboot.com or: (more complex version needed) a:\>boot.com 80h |
|||
12 Jan 2008, 21:36 |
|
Dex4u 13 Jan 2008, 05:58
This code may help bt108.zip
Quote: Boot from drive C:, even with floppy in A: http://www.digsys.bg/simtel.net/msdos/bootutil.html Look for "bt108.zip" it come with asm source. |
|||
13 Jan 2008, 05:58 |
|
edfed 13 Jan 2008, 06:19
ouaouuuu
thankxxxxxxxxxx how can you find sites like this? not with google for sure. edit: but... i don't want to overwrite the boot sector. it's dangerous and don't work if i start from CDrom, sorry, but finally, this link is useless. |
|||
13 Jan 2008, 06:19 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.