{"id":781,"date":"2020-12-06T17:54:21","date_gmt":"2020-12-06T17:54:21","guid":{"rendered":"https:\/\/www.ecsdump.net\/?page_id=781"},"modified":"2020-12-06T17:54:21","modified_gmt":"2020-12-06T17:54:21","slug":"os2ldr-entry-values","status":"publish","type":"page","link":"https:\/\/www.ecsdump.net\/?page_id=781","title":{"rendered":"os2ldr entry values"},"content":{"rendered":"<p>Using the Bochs image the entry values for os2ldr are:<\/p>\n<div>\n<pre>eax: 0x00000000\necx: 0x00000000\nedx: 0x00001480\nebx: 0x00000000\nesp: 0x00005000\nebp: 0x00000000\nesi: 0xFFFF000B\nedi: 0x0000124A\neip: 0x00000000\neflags 0x00000246\nIOPL=0 id vip vif ac vm rf nt of df IF tf sf ZF af PF cf\ncs:s=0x1000, dl=0x0000ffff, dh=0x00009b01, valid=1\nds:s=0x8800, dl=0x8000ffff, dh=0x00009308, valid=7\nss:s=0x8800, dl=0x8000ffff, dh=0x00009308, valid=7\nes:s=0x8800, dl=0x8000ffff, dh=0x00009308, valid=1\nfs:s=0x3000, dl=0x0000ffff, dh=0x00009303, valid=7\ngs:s=0x0000, dl=0x0000ffff, dh=0x00009300, valid=1\nldtr:s=0x0000, dl=0x0000ffff, dh=0x00008200, valid=1\ntr:s=0x0000, dl=0x0000ffff, dh=0x00008300, valid=1\ngdtr:base=0x000faeb2, limit=0x30\nidtr:base=0x00000000, limit=0x3ff<\/pre>\n<\/div>\n<p>DH boot mode flags:<\/p>\n<ul>\n<li>bit 0 (NOVOLIO) on indicates that the mini-FSD does not use MFSH_DOVOLIO.<\/li>\n<li>bit 1 (RIPL) on indicates that boot volume is not local (RIPL boot)<\/li>\n<li>bit 2 (MINIFSD) on indicates that a mini-FSD is present.<\/li>\n<li>bit 3 (RESERVED)<\/li>\n<li>bit 4 (MICROFSD) on indicates that a micro-FSD is present.<\/li>\n<li>bits 5-7 are reserved and MUST be zero.<\/li>\n<\/ul>\n<div>DH = b X X X 1 X 1 0 0 = MINIFSD | MICROFSD<\/div>\n<p>DL drive number for the boot disk. This parameter is ignored if either the NOVOLIO or MINIFSD bits are zero.\u00a0<\/p>\n<div>DL = b 10000000 = 0x80<\/div>\n<p>DS:SI is a pointer to the BOOT Media&#8217;s <a href=\"https:\/\/en.wikipedia.org\/wiki\/BIOS_parameter_block\" data-internallinksmanager029f6b8e52c=\"4\" title=\"BPB\" target=\"_blank\" rel=\"noopener\">BPB<\/a>. This parameter is ignored if either the NOVOLIO or MINIFSD bits are zero.\u00a0<\/p>\n<div>8800:000B (0x8800B)<\/div>\n<p>ES:DI is a pointer to a filetable structure.\u00a0<\/p>\n<div>8800:124A (0x8924A)<\/div>\n<p>The filetable structure has the following format:<\/p>\n<div>\n<pre>struct FileTable {\n    unsigned short ft_cfiles; \/* # of entries in this table             *\/\n    unsigned short ft_ldrseg; \/* paragraph # where OS2LDR is loaded     *\/\n    unsigned long  ft_ldrlen; \/* length of OS2LDR in bytes              *\/\n    unsigned short ft_museg;  \/* paragraph # where microFSD is loaded   *\/\n    unsigned long  ft_mulen;  \/* length of microFSD in bytes            *\/\n    unsigned short ft_mfsseg; \/* paragraph # where miniFSD is loaded    *\/\n    unsigned long  ft_mfslen; \/* length of miniFSD in bytes             *\/\n    unsigned short ft_ripseg; \/* paragraph # where RIPL data is loaded  *\/\n    unsigned long  ft_riplen; \/* length of RIPL data in bytes           *\/\n    \/* The next four elements are 16:16 pointers to microFSD entry points     *\/\n    unsigned short (far *ft_muOpen) (char far *pName, unsigned long far *pulFileSize);\n    unsigned long (far *ft_muRead) (long loffseek, char far *pBuf, unsigned long cbBuf);\n    unsigned long (far *ft_muClose)(void);\n    unsigned long (far *ft_muTerminate)(void);\n}<\/pre>\n<\/div>\n<p>Bochs values:<\/p>\n<table border=\"1\" cellspacing=\"1\" cellpadding=\"1\">\n<tbody>\n<tr>\n<td>filetable structure<\/td>\n<td>value<\/td>\n<\/tr>\n<tr>\n<td>ft_cfiles<\/td>\n<td>0x0003<\/td>\n<\/tr>\n<tr>\n<td>ft_ldrseg<\/td>\n<td>0x1000<\/td>\n<\/tr>\n<tr>\n<td>ft_ldrlen<\/td>\n<td>0x0000A800<\/td>\n<\/tr>\n<tr>\n<td>ft_museg<\/td>\n<td>0x8800<\/td>\n<\/tr>\n<tr>\n<td>ft_mulen<\/td>\n<td>0x00005000<\/td>\n<\/tr>\n<tr>\n<td>ft_mfsseg<\/td>\n<td>0x007C<\/td>\n<\/tr>\n<tr>\n<td>ft_mfslen<\/td>\n<td>0x0000EAE9<\/td>\n<\/tr>\n<tr>\n<td>ft_ripseg<\/td>\n<td>0x0000<\/td>\n<\/tr>\n<tr>\n<td>ft_riplen<\/td>\n<td>0x00000000<\/td>\n<\/tr>\n<tr>\n<td>ft_muOpen<\/td>\n<td>8800:1A9C<\/td>\n<\/tr>\n<tr>\n<td>ft_muRead<\/td>\n<td>8800:1BD4<\/td>\n<\/tr>\n<tr>\n<td>ft_muClose<\/td>\n<td>8800:1DAE<\/td>\n<\/tr>\n<tr>\n<td>ft_muTerminate<\/td>\n<td>8800:1DD4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The microFSD entry points interface is defined as follows:<br \/><strong>mu_Open<\/strong> &#8211; is passed a far pointer to name of file to be opened and a far pointer to a ULONG to return the file&#8217;s size. The returned value (in AX) indicates success(0) or failure(non-0).<br \/><strong>mu_Read<\/strong> &#8211; is passed a seek offset, a far pointer to a data buffer, and the size of the data buffer. The returned value(in DX:AX) indicates the number of bytes actually read.<br \/><strong>mu_Close<\/strong> &#8211; has no parameters and expects no return value. It is a signal to the micro-FSD that the loader is done reading the current file.<br \/><strong>mu_Terminate<\/strong> &#8211; has no parameters and expects no return value. It is a signal to the micro-FSD that the loader has finished reading the boot drive.<br \/>The loader will call the micro-FSD in a Open-Read-Read-&#8230;.-Read-Close sequence with each file read in from the boot drive.<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using the Bochs image the entry values for os2ldr are: eax: 0x00000000 ecx: 0x00000000 edx: 0x00001480 ebx: 0x00000000 esp: 0x00005000 ebp: 0x00000000 esi: 0xFFFF000B edi: 0x0000124A eip: 0x00000000 eflags 0x00000246 IOPL=0 id vip vif ac vm rf nt of df IF tf sf ZF af PF cf cs:s=0x1000, dl=0x0000ffff, dh=0x00009b01, valid=1 ds:s=0x8800, dl=0x8000ffff, dh=0x00009308, valid=7&hellip;<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/www.ecsdump.net\/?page_id=781\" title=\"Continue reading &lsquo;os2ldr entry values&rsquo;\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":779,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/full-width.php","meta":{"footnotes":""},"categories":[4,89],"tags":[20,82],"wf_page_folders":[80],"class_list":["post-781","page","type-page","status-publish","hentry","category-boot-process","category-os2ldr","tag-boot","tag-os2ldr"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=781"}],"version-history":[{"count":0,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/781\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/779"}],"wp:attachment":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=781"},{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fwf_page_folders&post=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}