flat assembler
Message board for the users of flat assembler.

Index > OS Construction > int 19h

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 12 Jan 2008, 02:46
why doesn't it work?
Code:
org 100h
mov dl,80h
int 19h
    
Post 12 Jan 2008, 02:46
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: 4624
Location: Argentina
LocoDelAssembly 12 Jan 2008, 02:51
Last time I did that it efectively started the boot sequence but I did this from a "pure" DOS (Win98 started as MS-DOS mode). Under Windows the program just finishes without doing anything (and if I remember right even the DOS console/fullscreen was killed despite I ran it from command.com).
Post 12 Jan 2008, 02:51
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
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.
Post 12 Jan 2008, 02:59
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
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.
Post 12 Jan 2008, 03:07
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 12 Jan 2008, 03:30
INT 19h is the bootstrap loader i.e. reboot the system, same as ctrl-alt-del
Post 12 Jan 2008, 03:30
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
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.
Post 12 Jan 2008, 03:38
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
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.
Post 12 Jan 2008, 08:15
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 12 Jan 2008, 08:36
yeah I know, but just trying to simplify things... Crying or Very sad

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.
Post 12 Jan 2008, 08:36
View user's profile Send private message Reply with quote
Vov4ik



Joined: 20 May 2007
Posts: 28
Location: USSR, Moscow Region
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 Smile so as DOS couldn't write smth over you int13 handler and system didn't hang.
Post 12 Jan 2008, 09:03
View user's profile Send private message ICQ Number Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
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.
Post 12 Jan 2008, 10:47
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
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?
Post 12 Jan 2008, 14:07
View user's profile Send private message Visit poster's website Reply with quote
Vov4ik



Joined: 20 May 2007
Posts: 28
Location: USSR, Moscow Region
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.
Post 12 Jan 2008, 14:28
View user's profile Send private message ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 12 Jan 2008, 14:43
don't work.
Post 12 Jan 2008, 14:43
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
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?
Post 12 Jan 2008, 15:12
View user's profile Send private message Visit poster's website Reply with quote
Vov4ik



Joined: 20 May 2007
Posts: 28
Location: USSR, Moscow Region
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.
Post 12 Jan 2008, 15:32
View user's profile Send private message ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
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.
Post 12 Jan 2008, 16:18
View user's profile Send private message Visit poster's website Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
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.
Post 12 Jan 2008, 21:23
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
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
Post 12 Jan 2008, 21:36
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
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.
Post 13 Jan 2008, 05:58
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 13 Jan 2008, 06:19
ouaouuuu

thankxxxxxxxxxx

how can you find sites like this? not with google for sure. Wink
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.
Post 13 Jan 2008, 06:19
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:  
Goto page 1, 2  Next

< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.