flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > INT 13h....... again! |
Author |
|
revo1ution 26 Mar 2011, 20:30
Well you haven't given your INT 13h code!
DAP from memory stands for Device Address Packet which is used ONLY with the extended INT 13h functions (EDDx), not the standard INT 13h BIOS functions. |
|||
26 Mar 2011, 20:30 |
|
egos 26 Mar 2011, 20:38
Quote: can you please tell me where is the problem Quote: the code must load the 2nd sector of CD, where kernel is located |
|||
26 Mar 2011, 20:38 |
|
BOTOKILLER 27 Mar 2011, 05:51
Code: ; Output format binary as 'iso' ; Macros macro @align_null a { repeat ((a - ($ mod a)) mod a) db NULL end repeat } macro iso9660_timestamp yr,mo,da,hr,mi,sc,off { db (yr - 1900) db mo db da db hr db mi db sc db off } macro iso9660_dw v { dw v db (v shr 8) db (v and 0xFF) } macro iso9660_dd v { dd v db ((v shr 24) and 0xFF) db ((v shr 16) and 0xFF) db ((v shr 8) and 0xFF) db (v and 0xFF) } macro iso9660_ddx v { db ((v shr 24) and 0xFF) db ((v shr 16) and 0xFF) db ((v shr 8) and 0xFF) db (v and 0xFF) } ; Constants DISK_SIZE_SECTOR equ 2048 NULL equ 0 ; OS Constants: ISO9660_BOOT_NUM_OF_SECTORS_PRESENT equ 1 ;Other stuff: IS09660_VDT_BOOTRECORD equ 0x00 IS09660_VDT_PRIMARY equ 0x01 IS09660_VDT_SUPPLEMENTARY equ 0x02 IS09660_VDT_PARTITION equ 0x03 IS09660_VDT_TERMINATOR equ 0xFF ; ISO image rb (16 * DISK_SIZE_SECTOR) db IS09660_VDT_PRIMARY db 'CD001' db 0x01 db 0 db ' ' db ' ' iso9660_dd 0 iso9660_dd (iso9660.boot / DISK_SIZE_SECTOR) dd 0,0,0,0,0,0,0,0 iso9660_dw 1 iso9660_dw 1 iso9660_dw DISK_SIZE_SECTOR iso9660_dd 10 dd (iso9660.plpath / DISK_SIZE_SECTOR) dd 0 iso9660_ddx (iso9660.pmpath / DISK_SIZE_SECTOR) dd 0 db 0x22 db 0x00 iso9660_dd (iso9660.pdr / DISK_SIZE_SECTOR) iso9660_dd DISK_SIZE_SECTOR iso9660_timestamp 2000,1,1,0,0,0,0 db 0x02 db 0x00 db 0x00 iso9660_dw 0 db 0x01 db 0x00 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0 dd 0 db 0 dq 0,0,0,0 dd 0 db 0 dq 0,0,0,0 dd 0 db 0 db '2000010100000000',0 db '2000010100000000',0 dd 0,0,0,0 db 0 dd 0,0,0,0 db 0 db 0x01 @align_null DISK_SIZE_SECTOR iso9660.brd: db IS09660_VDT_BOOTRECORD db 'CD001' db 0x01 db 'EL TORITO SPECIFICATION',0 dd 0,0 dd 0,0,0,0,0,0,0,0 dd (iso9660.bootcat / DISK_SIZE_SECTOR) @align_null DISK_SIZE_SECTOR iso9660.svd: db IS09660_VDT_SUPPLEMENTARY db 'CD001' db 0x01 db 0x00 dd 0,0,0,0,0,0,0,0 db 0,'c',0,'o',0,'d',0,'3',0,'b',0,'4',0,'5',0,'3' db 0,'b',0,'o',0,'o',0,'t',0,' ',0,'c',0,'d',0,' ' iso9660_dd 0 iso9660_dd (iso9660.boot / DISK_SIZE_SECTOR) db 0x25,0x2F,0x45,0 dd 0,0,0 dd 0,0,0,0 iso9660_dw 1 iso9660_dw 1 iso9660_dw DISK_SIZE_SECTOR iso9660_dd 10 dd (iso9660.slpath / DISK_SIZE_SECTOR) dd 0 iso9660_ddx (iso9660.smpath / DISK_SIZE_SECTOR) dd 0 db 0x22 db 0x00 iso9660_dd (iso9660.sdr / DISK_SIZE_SECTOR) iso9660_dd DISK_SIZE_SECTOR iso9660_timestamp 2000,1,1,0,0,0,0 db 0x02 db 0x00 db 0x00 iso9660_dw 0 db 0x01 db 0x00 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 dq 0,0,0,0 dd 0 db 0 dq 0,0,0,0 dd 0 db 0 dq 0,0,0,0 dd 0 db 0 db '2000010100000000',0 db '2000010100000000',0 dd 0,0,0,0 db 0 dd 0,0,0,0 db 0 db 0x01 @align_null DISK_SIZE_SECTOR iso9660.tvd: db IS09660_VDT_TERMINATOR db 'CD001' db 0x01 @align_null DISK_SIZE_SECTOR iso9660.boot: ; The boot sector include 'boot.asm' org (21 * DISK_SIZE_SECTOR) iso9660.bootcat: db 0x01 db 0x00 dw 0 dd 0,0,0,0,0,0 db 0xAA,0x55 db 0x55,0xAA db 0x88 db 0x00 dw 0x0000 db 0x00 db 0 dw 0x0004 dd (iso9660.boot / DISK_SIZE_SECTOR) @align_null DISK_SIZE_SECTOR iso9660.pdr: db 0x22 db 0x00 iso9660_dd (iso9660.pdr / DISK_SIZE_SECTOR) iso9660_dd DISK_SIZE_SECTOR iso9660_timestamp 2000,1,1,0,0,0,0 db 0x02 db 0 db 0 iso9660_dw 0 db 0x01 db 0x00 db 0x22 db 0x00 iso9660_dd (iso9660.pdr / DISK_SIZE_SECTOR) iso9660_dd 2048 iso9660_timestamp 2000,1,1,0,0,0,0 db 0x02 db 0 db 0 iso9660_dw 0 db 0x01 db 0x01 @align_null DISK_SIZE_SECTOR iso9660.plpath: db 0x01 db 0x00 dd (iso9660.pdr / DISK_SIZE_SECTOR) dw 1 dw 0 @align_null DISK_SIZE_SECTOR iso9660.pmpath: db 0x01 db 0x00 iso9660_ddx (iso9660.pdr / DISK_SIZE_SECTOR) iso9660_dw 1 iso9660_dw 0 @align_null DISK_SIZE_SECTOR iso9660.sdr: db 0x22 db 0x00 iso9660_dd (iso9660.sdr / DISK_SIZE_SECTOR) iso9660_dd DISK_SIZE_SECTOR iso9660_timestamp 2000,1,1,0,0,0,0 db 0x02 db 0 db 0 iso9660_dw 0 db 0x01 db 0x00 db 0x22 db 0x00 iso9660_dd (iso9660.sdr / DISK_SIZE_SECTOR) iso9660_dd DISK_SIZE_SECTOR iso9660_timestamp 2000,1,1,0,0,0,0 db 0x02 db 0 db 0 iso9660_dw 0 db 0x01 db 0x01 @align_null DISK_SIZE_SECTOR iso9660.slpath: db 0x01 db 0x00 dd (iso9660.sdr / DISK_SIZE_SECTOR) dw 1 dw 0 @align_null DISK_SIZE_SECTOR iso9660.smpath: db 0x01 db 0x00 iso9660_ddx (iso9660.sdr / DISK_SIZE_SECTOR) iso9660_dw 1 iso9660_dw 0 @align_null DISK_SIZE_SECTOR ; 2nd sector include 'kernel.asm' ; 3rd sector ;...... ; Other disk data can go here that is the code i use to output ISO file, I dont need any file system on this image, so, I guess kernel is going to be on the 2nd sector(please correct me if Im not right) |
|||
27 Mar 2011, 05:51 |
|
egos 27 Mar 2011, 14:26
KERNEL_SECTOR = KERNEL_POSITION/DISK_SIZE_SECTOR
|
|||
27 Mar 2011, 14:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.