From: Dirk B. <db...@us...> - 2005-09-15 16:36:18
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16338/src Modified Files: imageman.f Log Message: Replaced our Html display control (w32fHtmlDisplay.dll) with Tom's ActiveX control. So the file w32fHtmlDisplay.dll isn't needed any more. Index: imageman.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/imageman.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** imageman.f 29 Aug 2005 15:56:28 -0000 1.8 --- imageman.f 15 Sep 2005 16:36:09 -0000 1.9 *************** *** 7,11 **** IMAGEMAN builds Windows EXE images. ! For documentation on the PECOFF format, see http://www.microsoft.com/hwdev/hardware/PECOFF.asp. Note: not included because of copyright restrictions, but freely downloadable. Also see "Peering Inside the PE: A Tour --- 7,11 ---- IMAGEMAN builds Windows EXE images. ! For documentation on the PECOFF format, see http://www.microsoft.com/hwdev/hardware/PECOFF.asp. Note: not included because of copyright restrictions, but freely downloadable. Also see "Peering Inside the PE: A Tour *************** *** 35,39 **** VIMAGE IMAGEMAN has its own dictionary (because of possible name collisions) ! so a separate dictionary is used. COMPACT Standard file is built with 4096 (4KBYTE) file sections. COMPACT specifies 512 (0x200) file sections, which builds a smaller EXE file --- 35,39 ---- VIMAGE IMAGEMAN has its own dictionary (because of possible name collisions) ! so a separate dictionary is used. COMPACT Standard file is built with 4096 (4KBYTE) file sections. COMPACT specifies 512 (0x200) file sections, which builds a smaller EXE file *************** *** 70,74 **** ENDBUILD Creates the image from the information given above. ! s" name" IMAGE-LOAD Loads a .IMG file for subsequent conversion. Sets the following words as a side effect; IMAGE-PTR pointer to the loaded image --- 70,74 ---- ENDBUILD Creates the image from the information given above. ! s" name" IMAGE-LOAD Loads a .IMG file for subsequent conversion. Sets the following words as a side effect; IMAGE-PTR pointer to the loaded image *************** *** 108,112 **** The first section always starts on 0x1000. Section #1 will start at 0x1000, and be 0x1234 bytes padded out to the next 4K boundary (out to 0x2FFF). Section #2 will start ! at 0x3000, be 0x1120 bytes padded out to 0x4FFF, etc. The .idata section should be written last. --- 108,112 ---- The first section always starts on 0x1000. Section #1 will start at 0x1000, and be 0x1234 bytes padded out to the next 4K boundary (out to 0x2FFF). Section #2 will start ! at 0x3000, be 0x1120 bytes padded out to 0x4FFF, etc. The .idata section should be written last. *************** *** 161,165 **** cr ." File '" PEIMG-NAME count type ." ' : " ! WinErrMsg ON GetLastWinErr then ; --- 161,165 ---- cr ." File '" PEIMG-NAME count type ." ' : " ! WinErrMsg ON GetLastWinErr then ; *************** *** 185,189 **** PEIMG-HNDL FILE-POSITION ?PEIMG-FERROR d>s ; ! 0x1000 CONSTANT 4KBYTE 0x100000 CONSTANT 1MBYTE --- 185,189 ---- PEIMG-HNDL FILE-POSITION ?PEIMG-FERROR d>s ; ! 0x1000 CONSTANT 4KBYTE 0x100000 CONSTANT 1MBYTE *************** *** 252,256 **** RES-LOAD \ .res name before this RES-PTR RES-LEN ; ! )) --- 252,256 ---- RES-LOAD \ .res name before this RES-PTR RES-LEN ; ! )) *************** *** 353,357 **** "next" pointer points to a list of all functions (IMPORT) "func" pointer points to a list of functions in this library (IMPORTs in IMPLIB) ! Uses structure based on BASE-IMPSTR --- 353,357 ---- "next" pointer points to a list of all functions (IMPORT) "func" pointer points to a list of functions in this library (IMPORTs in IMPLIB) ! Uses structure based on BASE-IMPSTR *************** *** 404,408 **** Add imports a stand-alone section normally called .idata. Section must be declared. ! Steps: --- 404,408 ---- Add imports a stand-alone section normally called .idata. Section must be declared. ! Steps: *************** *** 412,416 **** Build the lib names, remember where we put them (write into the linked list at IMP-RVA) Build the hint/func names, remember where we put them ! If section isn't big enough, make it larger (we haven't written it yet) --- 412,416 ---- Build the lib names, remember where we put them (write into the linked list at IMP-RVA) Build the hint/func names, remember where we put them ! If section isn't big enough, make it larger (we haven't written it yet) *************** *** 430,437 **** IID-RVA-IAT ------------------------------------------------------+ ... ! # of IIDs = IMPLIB-COUNT + 1 # of ILT entries = IMPLIB-COUNT + IMPFUNC-COUNT (same for IAT) ! IAT is built first, and is the table modified by the loader to contain load addresses. Note that the entries are built back-to-front from the declaration order -- the last function --- 430,437 ---- IID-RVA-IAT ------------------------------------------------------+ ... ! # of IIDs = IMPLIB-COUNT + 1 # of ILT entries = IMPLIB-COUNT + IMPFUNC-COUNT (same for IAT) ! IAT is built first, and is the table modified by the loader to contain load addresses. Note that the entries are built back-to-front from the declaration order -- the last function *************** *** 457,461 **** : ENDIMPORTS ( -- addr len ) \ build import words, return buffer ! { \ CURR-IID CURR-ILT CURR-FUNCS CURR-IAT LEN-IAT LEN-ALLIIDS } \ temporaries --- 457,461 ---- : ENDIMPORTS ( -- addr len ) \ build import words, return buffer ! { \ CURR-IID CURR-ILT CURR-FUNCS CURR-IAT LEN-IAT LEN-ALLIIDS } \ temporaries *************** *** 471,475 **** CURR-IID ->RVA EXED-IMPORT ! \ point at imports LEN-ALLIIDS EXED-IMPORT CELL+ ! \ length of IIDs ! CURR-IAT ->RVA EXED-IAT ! \ point at IAT LEN-IAT EXED-IAT CELL+ ! \ length of IAT --- 471,475 ---- CURR-IID ->RVA EXED-IMPORT ! \ point at imports LEN-ALLIIDS EXED-IMPORT CELL+ ! \ length of IIDs ! CURR-IAT ->RVA EXED-IAT ! \ point at IAT LEN-IAT EXED-IAT CELL+ ! \ length of IAT *************** *** 492,496 **** CELL +TO CURR-ILT CELL +TO CURR-IAT \ update ILT/IAT pointers REPEAT ! CELL +TO CURR-ILT CELL +TO CURR-IAT \ update ILT/IAT pointers (zero entry) LEN-IID +TO CURR-IID \ next IID --- 492,496 ---- CELL +TO CURR-ILT CELL +TO CURR-IAT \ update ILT/IAT pointers REPEAT ! CELL +TO CURR-ILT CELL +TO CURR-IAT \ update ILT/IAT pointers (zero entry) LEN-IID +TO CURR-IID \ next IID *************** *** 627,635 **** SECTINIT ; ! : ENDBUILD ( -- ) \ fixup all the missing info cr ." Building image " PEIMG-NAME COUNT TYPE PEIMG-FCREATE \ create the file ! FILE-ALIGN EXEH-FILEALIGN ! \ n BYTE file align (mult of 512 bytes) LEN-HEAD EXEH-HEADSIZE ! \ n byte header size (mult of filealign) --- 627,635 ---- SECTINIT ; ! : ENDBUILD ( -- ) \ fixup all the missing info cr ." Building image " PEIMG-NAME COUNT TYPE PEIMG-FCREATE \ create the file ! FILE-ALIGN EXEH-FILEALIGN ! \ n BYTE file align (mult of 512 bytes) LEN-HEAD EXEH-HEADSIZE ! \ n byte header size (mult of filealign) *************** *** 654,658 **** R> cr ." Built length " dup . ." (" 1 H.R ." h) bytes" ! HEAD-BUFF release \ release storage --- 654,658 ---- R> cr ." Built length " dup . ." (" 1 H.R ." h) bytes" ! HEAD-BUFF release \ release storage *************** *** 665,669 **** TRUE VALUE CONSOLE-DLL? \ set to true if your app needs the w32fConsole.dll - FALSE VALUE HTML-DISPLAY-DLL? \ set to true if your app needs the w32fHtmlDisplay.dll FALSE VALUE SCINTILLA-DLL? \ set to true if your app needs the w32fScintilla.dll --- 665,668 ---- *************** *** 678,682 **** 1MBYTE 0x8000 HEAPSIZE IMAGE-ENTRY ENTRYPOINT ! s" .code" SECTION STD-DATA STD-CODE or SECTIONTYPE --- 677,681 ---- 1MBYTE 0x8000 HEAPSIZE IMAGE-ENTRY ENTRYPOINT ! s" .code" SECTION STD-DATA STD-CODE or SECTIONTYPE *************** *** 684,688 **** IMAGE-CSIZE SECTIONSIZE ENDSECTION ! s" .app" SECTION STD-DATA SECTIONTYPE --- 683,687 ---- IMAGE-CSIZE SECTIONSIZE ENDSECTION ! s" .app" SECTION STD-DATA SECTIONTYPE *************** *** 690,694 **** IMAGE-ASIZE SECTIONSIZE ENDSECTION ! IMAGE-SACTUAL IF \ might be a TURNKEY, so don't write section s" .sys" SECTION --- 689,693 ---- IMAGE-ASIZE SECTIONSIZE ENDSECTION ! IMAGE-SACTUAL IF \ might be a TURNKEY, so don't write section s" .sys" SECTION *************** *** 698,702 **** ENDSECTION THEN ! s" .idata" SECTION S-INIT S-READ OR SECTIONTYPE --- 697,701 ---- ENDSECTION THEN ! s" .idata" SECTION S-INIT S-READ OR SECTIONTYPE *************** *** 704,715 **** s" W32FCONSOLE.DLL" IMPLIB \ force load of the DLL, required 0 s" c_initconsole" IMPORT - THEN - - HTML-DISPLAY-DLL? IF - s" w32fHtmlDisplay.dll" IMPLIB \ force load of the DLL, required - 0 s" DoPageAction" IMPORT THEN ! SCINTILLA-DLL? IF s" w32fScintilla.dll" IMPLIB \ force load of the DLL, required 0 s" Scintilla_DirectFunction@16" IMPORT --- 703,709 ---- s" W32FCONSOLE.DLL" IMPLIB \ force load of the DLL, required 0 s" c_initconsole" IMPORT THEN ! SCINTILLA-DLL? IF s" w32fScintilla.dll" IMPLIB \ force load of the DLL, required 0 s" Scintilla_DirectFunction@16" IMPORT *************** *** 730,734 **** ENDBUILD ; ! PREVIOUS DEFINITIONS ALSO VIMAGE --- 724,728 ---- ENDBUILD ; ! PREVIOUS DEFINITIONS ALSO VIMAGE *************** *** 789,793 **** cannot be debugged. TURNKEY is followed by the name of the program to create. The name passed to TURNKEY must not be the ! same name as the Forth you are currently running. TURNKEY is used as follows; --- 783,787 ---- cannot be debugged. TURNKEY is followed by the name of the program to create. The name passed to TURNKEY must not be the ! same name as the Forth you are currently running. TURNKEY is used as follows; *************** *** 813,817 **** can still be debugged. APPLICATION is followed by the name of the program to create. The name passed to APPLICATION must not be the same ! name as the Forth you are currently running. APPLICATION is used as follows; --- 807,811 ---- can still be debugged. APPLICATION is followed by the name of the program to create. The name passed to APPLICATION must not be the same ! name as the Forth you are currently running. APPLICATION is used as follows; *************** *** 833,837 **** : PORIG ( n -- ) tab IMAGE-ORIGIN + 8 H.R ." h" ; ! : PSIZE ( n -- ) tab 7 .r ; --- 827,831 ---- : PORIG ( n -- ) tab IMAGE-ORIGIN + 8 H.R ." h" ; ! : PSIZE ( n -- ) tab 7 .r ; |