mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-25 14:54:28 +02:00
We must do "sbb ax, ax" *before* "popf" otherwise it won't be predictable!
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@856 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
11e57c64db
commit
cfed8c6f29
20
sys/sys.c
20
sys/sys.c
@ -29,7 +29,7 @@
|
|||||||
#define DEBUG
|
#define DEBUG
|
||||||
/* #define DDEBUG */
|
/* #define DDEBUG */
|
||||||
|
|
||||||
#define SYS_VERSION "v3.1"
|
#define SYS_VERSION "v3.2"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <dos.h>
|
#include <dos.h>
|
||||||
@ -437,9 +437,9 @@ int absread(int DosDrive, int nsects, int foo, void *diskReadPacket);
|
|||||||
#pragma aux absread = \
|
#pragma aux absread = \
|
||||||
"push bp" \
|
"push bp" \
|
||||||
"int 0x25" \
|
"int 0x25" \
|
||||||
|
"sbb ax, ax" \
|
||||||
"popf" \
|
"popf" \
|
||||||
"pop bp" \
|
"pop bp" \
|
||||||
"sbb ax, ax" \
|
|
||||||
parm [ax] [cx] [dx] [bx] \
|
parm [ax] [cx] [dx] [bx] \
|
||||||
modify [si di] \
|
modify [si di] \
|
||||||
value [ax];
|
value [ax];
|
||||||
@ -448,9 +448,9 @@ int abswrite(int DosDrive, int nsects, int foo, void *diskReadPacket);
|
|||||||
#pragma aux abswrite = \
|
#pragma aux abswrite = \
|
||||||
"push bp" \
|
"push bp" \
|
||||||
"int 0x26" \
|
"int 0x26" \
|
||||||
|
"sbb ax, ax" \
|
||||||
"popf" \
|
"popf" \
|
||||||
"pop bp" \
|
"pop bp" \
|
||||||
"sbb ax, ax" \
|
|
||||||
parm [ax] [cx] [dx] [bx] \
|
parm [ax] [cx] [dx] [bx] \
|
||||||
modify [si di] \
|
modify [si di] \
|
||||||
value [ax];
|
value [ax];
|
||||||
@ -709,6 +709,13 @@ void put_boot(int drive, char *bsFile, char *kernel_name, int load_seg, int both
|
|||||||
|
|
||||||
bs = (struct bootsectortype *)&oldboot;
|
bs = (struct bootsectortype *)&oldboot;
|
||||||
|
|
||||||
|
if (bs->bsBytesPerSec != SEC_SIZE)
|
||||||
|
{
|
||||||
|
printf("Sector size is not 512 but %d bytes - not currently supported!\n",
|
||||||
|
bs->bsBytesPerSec);
|
||||||
|
exit(1); /* Japan?! */
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
/* see "FAT: General Overview of On-Disk Format" v1.02, 5.V.1999
|
/* see "FAT: General Overview of On-Disk Format" v1.02, 5.V.1999
|
||||||
* (http://www.nondot.org/sabre/os/files/FileSystems/FatFormat.pdf)
|
* (http://www.nondot.org/sabre/os/files/FileSystems/FatFormat.pdf)
|
||||||
@ -733,13 +740,6 @@ void put_boot(int drive, char *bsFile, char *kernel_name, int load_seg, int both
|
|||||||
fs = FAT32;
|
fs = FAT32;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bs->bsBytesPerSec != SEC_SIZE)
|
|
||||||
{
|
|
||||||
printf("Sector size is not 512 but %d bytes - not currently supported!\n",
|
|
||||||
bs->bsBytesPerSec);
|
|
||||||
exit(1); /* Japan?! */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* bit 0 set if function to use current BPB, clear if Device
|
/* bit 0 set if function to use current BPB, clear if Device
|
||||||
BIOS Parameter Block field contains new default BPB
|
BIOS Parameter Block field contains new default BPB
|
||||||
bit 1 set if function to use track layout fields only
|
bit 1 set if function to use track layout fields only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user