| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e4a62f2 commit 5880d36
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -410,8 +410,12 @@ readDisk: push si | |||
| 410 | 410 | mov word [READADDR_SEG], es | |
| 411 | 411 | mov word [READADDR_OFF], bx | |
| 412 | 412 | ||
| 413 | + %ifndef QUIET | ||
| 413 | 414 | call show | |
| 414 | 415 | db ".",0 | |
| 416 | + %else ; ensure code after this still at same location | ||
| 417 | + times 5 nop | ||
| 418 | + %endif | ||
| 415 | 419 | read_next: | |
| 416 | 420 | ||
| 417 | 421 | ;******************** LBA_READ ******************************* | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -135,8 +135,12 @@ cont: mov ds, ax | |||
| 135 | 135 | sti | |
| 136 | 136 | mov [drive], dl ; BIOS passes drive number in DL | |
| 137 | 137 | ||
| 138 | + %ifndef QUIET | ||
| 138 | 139 | mov si, msg_LoadFreeDOS | |
| 139 | 140 | call print ; modifies AX BX SI | |
| 141 | + %else ; ensure code after this still at same location | ||
| 142 | + times 6 nop | ||
| 143 | + %endif | ||
| 140 | 144 | ||
| 141 | 145 | ||
| 142 | 146 | ; ------------- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,22 +8,22 @@ | |||
| 8 | 8 | production: fat12com.bin fat16com.bin fat32chs.bin fat32lba.bin oemfat12.bin oemfat16.bin | |
| 9 | 9 | ||
| 10 | 10 | fat12com.bin: boot.asm | |
| 11 | - $(NASM) -dISFAT12 boot.asm -l$*.lst -ofat12com.bin | ||
| 11 | + $(NASM) -dISFAT12 $(NASMFLAGS) boot.asm -l$*.lst -ofat12com.bin | ||
| 12 | 12 | ||
| 13 | 13 | fat16com.bin: boot.asm | |
| 14 | - $(NASM) -dISFAT16 boot.asm -l$*.lst -ofat16com.bin | ||
| 14 | + $(NASM) -dISFAT16 $(NASMFLAGS) boot.asm -l$*.lst -ofat16com.bin | ||
| 15 | 15 | ||
| 16 | 16 | fat32chs.bin: boot32.asm | |
| 17 | - $(NASM) boot32.asm -l$*.lst -ofat32chs.bin | ||
| 17 | + $(NASM) $(NASMFLAGS) boot32.asm -l$*.lst -ofat32chs.bin | ||
| 18 | 18 | ||
| 19 | 19 | fat32lba.bin: boot32lb.asm | |
| 20 | - $(NASM) boot32lb.asm -l$*.lst -ofat32lba.bin | ||
| 20 | + $(NASM) $(NASMFLAGS) boot32lb.asm -l$*.lst -ofat32lba.bin | ||
| 21 | 21 | ||
| 22 | 22 | oemfat12.bin: oemboot.asm | |
| 23 | - $(NASM) -dISFAT12 oemboot.asm -l$*.lst -ooemfat12.bin | ||
| 23 | + $(NASM) -dISFAT12 $(NASMFLAGS) oemboot.asm -l$*.lst -ooemfat12.bin | ||
| 24 | 24 | ||
| 25 | 25 | oemfat16.bin: oemboot.asm | |
| 26 | - $(NASM) -dISFAT16 oemboot.asm -l$*.lst -ooemfat16.bin | ||
| 26 | + $(NASM) -dISFAT16 $(NASMFLAGS) oemboot.asm -l$*.lst -ooemfat16.bin | ||
| 27 | 27 | ||
| 28 | 28 | clobber: clean | |
| 29 | 29 | -$(RM) *.bin status.me | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,4 +50,6 @@ typedef struct _KernelConfig { | |||
| 50 | 50 | /* 0 = do not check (assume absent), | |
| 51 | 51 | 1 = do check by running breakpoint, | |
| 52 | 52 | 2 = assume present */ | |
| 53 | + | ||
| 54 | + signed char Verbose; /* -1 = quiet, 0 = normal, 1 = verbose */ | ||
| 53 | 55 | } KernelConfig; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1225,7 +1225,7 @@ STATIC void Config_Buffers(BYTE * pLine) | |||
| 1225 | 1225 | STATIC void CfgBuffersHigh(BYTE * pLine) | |
| 1226 | 1226 | { | |
| 1227 | 1227 | Config_Buffers(pLine); | |
| 1228 | - printf("Note: BUFFERS will be in HMA or low RAM, not in UMB\n"); | ||
| 1228 | + if (InitKernelConfig.Verbose >= 0) printf("Note: BUFFERS will be in HMA or low RAM, not in UMB\n"); | ||
| 1229 | 1229 | } | |
| 1230 | 1230 | ||
| 1231 | 1231 | /** | |
@@ -1276,7 +1276,7 @@ STATIC VOID sysVersion(BYTE * pLine) | |||
| 1276 | 1276 | if (GetNumArg(p, &minor) == (BYTE *) 0) | |
| 1277 | 1277 | return; | |
| 1278 | 1278 | ||
| 1279 | - printf("Changing reported version to %d.%d\n", major, minor); | ||
| 1279 | + if (InitKernelConfig.Verbose >= 0) printf("Changing reported version to %d.%d\n", major, minor); | ||
| 1280 | 1280 | ||
| 1281 | 1281 | LoL->os_setver_major = major; /* not the internal os_major */ | |
| 1282 | 1282 | LoL->os_setver_minor = minor; /* not the internal os_minor */ | |
@@ -2223,8 +2223,11 @@ STATIC void config_init_buffers(int wantedbuffers) | |||
| 2223 | 2223 | if (FP_SEG(pbuffer) == 0xffff) | |
| 2224 | 2224 | { | |
| 2225 | 2225 | buffers++; | |
| 2226 | - printf("Kernel: allocated %d Diskbuffers = %u Bytes in HMA\n", | ||
| 2226 | + if (InitKernelConfig.Verbose >= 0) | ||
| 2227 | + { | ||
| 2228 | + printf("Kernel: allocated %d Diskbuffers = %u Bytes in HMA\n", | ||
| 2227 | 2229 | buffers, buffers * sizeof(struct buffer)); | |
| 2230 | + } | ||
| 2228 | 2231 | } | |
| 2229 | 2232 | } | |
| 2230 | 2233 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -356,7 +356,7 @@ void init_LBA_to_CHS(struct CHS *chs, ULONG LBA_address, | |||
| 356 | 356 | void printCHS(char *title, struct CHS *chs) | |
| 357 | 357 | { | |
| 358 | 358 | /* has no fixed size for head/sect: is often 1/1 in our context */ | |
| 359 | - printf("%s%4u-%u-%u", title, chs->Cylinder, chs->Head, chs->Sector); | ||
| 359 | + if (InitKernelConfig.Verbose >= 0) printf("%s%4u-%u-%u", title, chs->Cylinder, chs->Head, chs->Sector); | ||
| 360 | 360 | } | |
| 361 | 361 | ||
| 362 | 362 | /* | |
@@ -735,7 +735,7 @@ STATIC int LBA_Get_Drive_Parameters(int drive, struct DriveParamS *driveParam) | |||
| 735 | 735 | if (driveParam->chs.Sector == 0) { | |
| 736 | 736 | /* happens e.g. with Bochs 1.x if no harddisk defined */ | |
| 737 | 737 | driveParam->chs.Sector = 63; /* avoid division by zero...! */ | |
| 738 | - printf("BIOS reported 0 sectors/track, assuming 63!\n"); | ||
| 738 | + if (InitKernelConfig.Verbose >= 0) printf("BIOS reported 0 sectors/track, assuming 63!\n"); | ||
| 739 | 739 | } | |
| 740 | 740 | ||
| 741 | 741 | if (!(driveParam->descflags & DF_LBA)) | |
@@ -819,10 +819,13 @@ void print_warning_suspect(char *partitionName, UBYTE fs, struct CHS *chs, | |||
| 819 | 819 | { | |
| 820 | 820 | if (!InitKernelConfig.ForceLBA) | |
| 821 | 821 | { | |
| 822 | - printf("WARNING: using suspect partition %s FS %02x:", partitionName, fs); | ||
| 823 | - printCHS(" with calculated values ", chs); | ||
| 824 | - printCHS(" instead of ", pEntry_chs); | ||
| 825 | - printf("\n"); | ||
| 822 | + if (InitKernelConfig.Verbose >= 0) | ||
| 823 | + { | ||
| 824 | + printf("WARNING: using suspect partition %s FS %02x:", partitionName, fs); | ||
| 825 | + printCHS(" with calculated values ", chs); | ||
| 826 | + printCHS(" instead of ", pEntry_chs); | ||
| 827 | + printf("\n"); | ||
| 828 | + } | ||
| 826 | 829 | } | |
| 827 | 830 | memcpy(pEntry_chs, chs, sizeof(struct CHS)); | |
| 828 | 831 | } | |
@@ -1386,7 +1389,7 @@ void ReadAllPartitionTables(void) | |||
| 1386 | 1389 | /* disk initialization: returns number of units */ | |
| 1387 | 1390 | COUNT dsk_init() | |
| 1388 | 1391 | { | |
| 1389 | - printf(" - InitDisk"); | ||
| 1392 | + if (InitKernelConfig.Verbose >= 0) printf(" - InitDisk"); | ||
| 1390 | 1393 | ||
| 1391 | 1394 | #if defined(DEBUG) && !defined(DOSEMU) | |
| 1392 | 1395 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -77,7 +77,8 @@ Version_Major db 2 | |||
| 77 | 77 | Version_Revision dw 43 ; REVISION_SEQ | |
| 78 | 78 | Version_Release dw 1 ; 0=release build, >0=svn# | |
| 79 | 79 | ||
| 80 | - CheckDebugger: db 0 ; 0 = no check, 1 = check, 2 = assume present | ||
| 80 | + CheckDebugger: db 0 ; 0 = no check, 1 = check, 2 = assume present | ||
| 81 | + Verbose db -1 ; -1 = quiet, 0 = normal, 1 = verbose | ||
| 81 | 82 | configend: | |
| 82 | 83 | kernel_config_size: equ configend - config_signature | |
| 83 | 84 | ; must be below-or-equal the size of struct _KernelConfig | |
@@ -118,6 +119,7 @@ realentry: ; execution continues here | |||
| 118 | 119 | ||
| 119 | 120 | times 0C0h - ($ - $$) nop ; magic offset (used by exeflat) | |
| 120 | 121 | entry_common: | |
| 122 | + %ifndef QUIET | ||
| 121 | 123 | push ax | |
| 122 | 124 | push bx | |
| 123 | 125 | pushf | |
@@ -127,6 +129,7 @@ entry_common: | |||
| 127 | 129 | popf | |
| 128 | 130 | pop bx | |
| 129 | 131 | pop ax | |
| 132 | + %endif | ||
| 130 | 133 | ||
| 131 | 134 | push cs | |
| 132 | 135 | pop ds | |
@@ -165,13 +168,15 @@ segment INIT_TEXT | |||
| 165 | 168 | kernel_start: | |
| 166 | 169 | cld | |
| 167 | 170 | ||
| 171 | + %ifndef QUIET | ||
| 168 | 172 | push bx | |
| 169 | 173 | pushf | |
| 170 | 174 | mov ax, 0e32h ; '2' Tracecode - kernel entered | |
| 171 | 175 | mov bx, 00f0h | |
| 172 | 176 | int 010h | |
| 173 | 177 | popf | |
| 174 | 178 | pop bx | |
| 179 | + %endif | ||
| 175 | 180 | ||
| 176 | 181 | ||
| 177 | 182 | extern _kernel_command_line | |
@@ -275,13 +280,15 @@ cont: ; Now set up call frame | |||
| 275 | 280 | mov ds,[cs:_INIT_DGROUP] | |
| 276 | 281 | mov bp,sp ; and set up stack frame for c | |
| 277 | 282 | ||
| 283 | + %ifndef QUIET | ||
| 278 | 284 | push bx | |
| 279 | 285 | pushf | |
| 280 | 286 | mov ax, 0e33h ; '3' Tracecode - kernel entered | |
| 281 | 287 | mov bx, 00f0h | |
| 282 | 288 | int 010h | |
| 283 | 289 | popf | |
| 284 | 290 | pop bx | |
| 291 | + %endif | ||
| 285 | 292 | ||
| 286 | 293 | mov byte [_BootDrive],bl ; tell where we came from | |
| 287 | 294 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -437,6 +437,17 @@ STATIC VOID FsConfig(VOID) | |||
| 437 | 437 | ||
| 438 | 438 | STATIC VOID signon() | |
| 439 | 439 | { | |
| 440 | + if (InitKernelConfig.Verbose < 0) | ||
| 441 | + { | ||
| 442 | + #ifdef CUSTOM_BRANDING | ||
| 443 | + printf("\n\r" CUSTOM_BRANDING "\n\n"); | ||
| 444 | + #else | ||
| 445 | + printf("\n\r%S\n\n", MK_FP(FP_SEG(LoL), FP_OFF(LoL->os_release))); | ||
| 446 | + #endif | ||
| 447 | + } else { | ||
| 448 | + #ifdef CUSTOM_BRANDING | ||
| 449 | + printf("\n\r" CUSTOM_BRANDING "\n\n%s", copyright); | ||
| 450 | + #else | ||
| 440 | 451 | printf("\r%S" | |
| 441 | 452 | "Kernel compatibility %d.%d - " | |
| 442 | 453 | #if defined(__BORLANDC__) | |
@@ -465,6 +476,8 @@ STATIC VOID signon() | |||
| 465 | 476 | "\n\n%s", | |
| 466 | 477 | MK_FP(FP_SEG(LoL), FP_OFF(LoL->os_release)), | |
| 467 | 478 | MAJOR_RELEASE, MINOR_RELEASE, copyright); | |
| 479 | + #endif | ||
| 480 | + } | ||
| 468 | 481 | } | |
| 469 | 482 | ||
| 470 | 483 | STATIC void kernel() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ | |||
| 13 | 13 | * merged into SYS by tom ehlert * | |
| 14 | 14 | ***************************************************************************/ | |
| 15 | 15 | ||
| 16 | - char VERSION[] = "v1.03"; | ||
| 16 | + char VERSION[] = "v1.04"; | ||
| 17 | 17 | char PROGRAM[] = "SYS CONFIG"; | |
| 18 | 18 | char KERNEL[] = "KERNEL.SYS"; | |
| 19 | 19 | ||
@@ -94,7 +94,9 @@ void showUsage(void) | |||
| 94 | 94 | " SKIPCONFIGSECONDS=#, FORCELBA=0|1\n" | |
| 95 | 95 | " GLOBALENABLELBASUPPORT=0|1\n" | |
| 96 | 96 | " BootHarddiskSeconds=0|seconds to wait\n" | |
| 97 | - " CheckDebugger=0|1|2\n"); | ||
| 97 | + " CheckDebugger=0|1|2\n" | ||
| 98 | + " Verbose=0|1\n" | ||
| 99 | + ); | ||
| 98 | 100 | } | |
| 99 | 101 | ||
| 100 | 102 | /* simply reads in current configuration values, exiting program | |
@@ -223,6 +225,13 @@ void displayConfigSettings(KernelConfig * cfg) | |||
| 223 | 225 | cfg->CheckDebugger); | |
| 224 | 226 | } | |
| 225 | 227 | ||
| 228 | + if (cfg->ConfigSize >= 14) | ||
| 229 | + { | ||
| 230 | + printf | ||
| 231 | + ("Verbose=%d : -1=quiet, *0=normal, 1=verbose\n", | ||
| 232 | + cfg->Verbose); | ||
| 233 | + } | ||
| 234 | + | ||
| 226 | 235 | #if 0 /* we assume that SYS is as current as the kernel */ | |
| 227 | 236 | ||
| 228 | 237 | /* Print value any options added that are unknown as hex dump */ | |
@@ -495,6 +504,11 @@ int FDKrnConfigMain(int argc, char **argv) | |||
| 495 | 504 | setByteOption(&(cfg.CheckDebugger), | |
| 496 | 505 | cptr, 2, &updates, "CheckDebugger"); | |
| 497 | 506 | } | |
| 507 | + else if (memicmp(argptr, "VERBOSE", 3) == 0) | ||
| 508 | + { | ||
| 509 | + setSByteOption(&(cfg.Verbose), | ||
| 510 | + cptr, -1, 1, &updates, "VERBOSE"); | ||
| 511 | + } | ||
| 498 | 512 | else | |
| 499 | 513 | { | |
| 500 | 514 | illegal_arg: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments