{"id":193,"date":"2015-07-21T06:20:52","date_gmt":"2015-07-21T10:20:52","guid":{"rendered":"http:\/\/72.167.111.237\/wpecsdump\/?page_id=193"},"modified":"2020-12-06T23:58:27","modified_gmt":"2020-12-06T23:58:27","slug":"devhlp_openfile","status":"publish","type":"page","link":"https:\/\/www.ecsdump.net\/?page_id=193","title":{"rendered":"DevHlp_OpenFile"},"content":{"rendered":"<h3>Description<\/h3>\n<p>This devhlp allows to open a file for read access in the Init routine of a BASEDEV.<\/p>\n<h3>Calling convention<\/h3>\n<p>ES:DI = point to a SYIOpenFile structure<\/p>\n<ul>\n<li>DL = 07fh<\/li>\n<\/ul>\n<h3>Returns<\/h3>\n<ul>\n<li>CY=0, AX = 0: okay, structure pointed to by ES:DI is modified<\/li>\n<li>CY=1, AX = ERROR_BAD_LENGTH: packet is invalid<\/li>\n<li>CY=1, AX = &lt;&gt;0: other filesystem related errors<\/li>\n<\/ul>\n<h3>Data structures<\/h3>\n<pre lang=\"asm\">; assembler structure\nSYIOpenFile struc\nlength\t\tdw\t8\t; length of structure, must contain value 8\nname\t\tdd\t?\t; 16:16 ASCIZ pathname\nfsize\t\tdd\t?\t; returned: size of file\nSYIOpenFile\tends<\/pre>\n<h3>Restrictions<\/h3>\n<p>Valid at INIT time only. This routine is not handle based, so it is only possible to have only one file at a time open. This routine uses the corresponding function of the miniFSD, not normal file I\/O, thus access is restricted. At this phase of boot, drive letters do not yet exist, and IFSs\/DMDs might not yet have been initialized, so you can only open files on the boot drive. Depending on the type of IPL (e.g. loading from a network file system), other restrictions might apply.<\/p>\n<h3>Bugs<\/h3>\n<p>The returned file size is unreliable, the value returned is always<\/p>\n<p style=\"text-align: center;\"><strong>Republished without permission from Holger Veit&#8217;s long gone webpages &#8211; MKG<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description This devhlp allows to open a file for read access in the Init routine of a BASEDEV. Calling convention ES:DI = point to a SYIOpenFile structure DL = 07fh Returns CY=0, AX = 0: okay, structure pointed to by ES:DI is modified CY=1, AX = ERROR_BAD_LENGTH: packet is invalid CY=1, AX = &lt;&gt;0: other&hellip;<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/www.ecsdump.net\/?page_id=193\" title=\"Continue reading &lsquo;DevHlp_OpenFile&rsquo;\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":836,"menu_order":5,"comment_status":"open","ping_status":"open","template":"page-templates\/full-width.php","meta":{"footnotes":""},"categories":[13,10],"tags":[22,28],"wf_page_folders":[76],"class_list":["post-193","page","type-page","status-publish","hentry","category-devhelp","category-os2","tag-devhlp","tag-os2"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/193","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=193"}],"version-history":[{"count":0,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/193\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/836"}],"wp:attachment":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=193"},{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fwf_page_folders&post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}