BCOS UtilitiesProject Map
"Get EDID" Boot Floppy
File: util/getedid/0index.asm
 

Copyright © Brendan Trotter 2008

This material is provided by Brendan Trotter as a service to interested parties on an "as-is" basis, for informational purposes only. Brendan Trotter assumes no responsibility for any errors or omissions. Brendan Trotter does not make, and expressly disclaims any, representations or warranties, express or implied, regarding this web page and the host web site, including, without limitation, any implied warranties of merchantability or fitness for a particular purpose.

Under no circumstances shall Brendan Trotter, or any associated contributors, volunteers or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with this web page, the host web site, or the materials contained herein.

All materials contained in these files are protected by copyright laws, and may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Brendan Trotter. You may make one copy of this web page for your personal and non-commercial use only, without altering or removing this copyright notice or any other notice.




Overview

This index file determines the layout of all other source files in memory. The final binary is a 1440 KiB floppy image that can be used to obtain the EDID information from the monitor, create a file (in the native file format - see BCOS EDID File Format Specification) and store this file on the floppy starting from the third sector. This allows the EDID information to be copied from the floppy disk into a normal file (and then included in a Boot Image).

WARNING: This code is a quick hack!

21: %include "asm.inc"


Assembler Setup

27:       ORG 0x7C00
28: 
29: 
      BITS 16
30:       CPU 386
31: 
32: 
      section .bss
33: BSS_START:
34:       section .text


Start of Binary and Entry Point

41: ;Input
42: ; dl        BIOS device number
43: 
44: 
      jmp 0x000:START


BIOS Parameter Block

50:                   times ($$-$+0x00B) nop
51: 
52: 
                  dw 0x0200               ;0x00B, Bytes per sector
53:                   db 1                    ;0x00D, Sectors per cluster
54:                   dw 80*18*2              ;0x00E, Sectors in reserved area
55:                   db 0                    ;0x010, Number of copies of FAT
56:                   db 0                    ;0x011, Number of root directory entries (low byte)
57: STACK_TOP:
58:                   db 0                    ;0x011, Number of root directory entries (high byte)
59:                   dw 80*18*2              ;0x013, Total number of sectors
60:                   db 0                    ;0x015, Media descriptor
61:                   dw 0                    ;0x016, Number of sectors per FAT
62: sectorsPerTrack:  dw 18                   ;0x018, Number of sectors per track
63: totalHeads:       dw 2                    ;0x01A, Number of heads
64:                   dd 80*18*2              ;0x01C, Number of hidden sectors
65:                   dd 80*18*2              ;0x020, Total number of sectors


Source Code - Part 1

72: %include "init.asm"
73: %include "abort.asm"
74: %include "video/init.asm"
75: %include "video/print.asm"
76: %include "data1.asm"


Bootable Marker

82:       times ($$-$+0x01FE) db 0x00
83:       dw 0xAA55


Source Code - Part 2

89: %include "data2.asm"
90: %include "getedid.asm"
91: %include "header.asm"
92: %include "write.asm"


The End

Here we define a few labels that are used later.

101:       align 512
102:       section .bss
103:       alignb 16
104: BSS_END:


Generated on Sat Aug 1 16:05:47 2009