wisp-cvs Mailing List for Wisp interpreter (Page 2)
Status: Alpha
Brought to you by:
digg
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(30) |
Sep
(312) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(5) |
Feb
(131) |
Mar
(17) |
Apr
(184) |
May
(252) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: <di...@us...> - 2003-05-21 13:23:13
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv4091 Modified Files: pe.py Log Message: made WINDOWS_CHAR only the default subsystem Index: pe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- pe.py 21 May 2003 12:44:45 -0000 1.32 +++ pe.py 21 May 2003 13:23:10 -0000 1.33 @@ -181,7 +181,7 @@ # 4.0 = MSW95 e.place_symbol('#aout/subsys-version-major', 4) e.place_symbol('#aout/subsys-version-minor', 0) - e.place_symbol('#aout/subsys', PE_SUBSYS.WINDOWS_CHAR) + e.place_symbol('#?aout/subsys', PE_SUBSYS.WINDOWS_CHAR) e.place_symbol('#aout/stack-reserve-size', 1024 * 1024) # one megabyte e.place_symbol('#aout/stack-commit-size', 0x1000) # one page e.place_symbol('#aout/heap-reserve-size', 1024 * 1024) # one megabyte |
From: <di...@us...> - 2003-05-21 13:22:50
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv3804 Modified Files: pedump.py Log Message: explicitly specify UTF-8 encoding for pedump.py Index: pedump.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pedump.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pedump.py 21 May 2003 12:42:43 -0000 1.7 +++ pedump.py 21 May 2003 13:22:47 -0000 1.8 @@ -1,4 +1,5 @@ #! /usr/bin/python +# coding: utf-8 #### pedump.py - parse PE data structures # |
From: <di...@us...> - 2003-05-21 13:17:06
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv32045 Modified Files: winapi.tran Log Message: implemented AllocConsole Index: winapi.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/winapi.tran,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- winapi.tran 21 May 2003 12:58:57 -0000 1.6 +++ winapi.tran 21 May 2003 13:17:02 -0000 1.7 @@ -24,4 +24,7 @@ :[ ] Sleep \ ( millisec -- ) commit 'Sleep@kernel32 $call %eax ; +:[ ] AllocConsole \ ( -- success? ) + commit 'AllocConsole@kernel32 $call %eax ; + \ vim: ft=tran |
From: <di...@us...> - 2003-05-21 12:59:03
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv20078 Modified Files: winapi.tran Log Message: implemented Sleep Index: winapi.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/winapi.tran,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- winapi.tran 21 May 2003 12:25:26 -0000 1.5 +++ winapi.tran 21 May 2003 12:58:57 -0000 1.6 @@ -21,4 +21,7 @@ :[ ] SetConsoleTitleW \ ( string -- result ) commit 'SetConsoleTitleW@kernel32 $call %eax ; +:[ ] Sleep \ ( millisec -- ) + commit 'Sleep@kernel32 $call %eax ; + \ vim: ft=tran |
From: <di...@us...> - 2003-05-21 12:44:53
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv10186 Modified Files: pe.py Log Message: align *before* placing the import thunk label Index: pe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- pe.py 20 May 2003 05:05:31 -0000 1.31 +++ pe.py 21 May 2003 12:44:45 -0000 1.32 @@ -113,8 +113,8 @@ # emit thunk structures for dll in imports_by_dlls.keys(): for sym in imports_by_dlls[dll].keys(): - imports.place_symbol('&.imports/thunk/%s@%s' % (sym, dll)) imports.align(2) + imports.place_symbol('&.imports/thunk/%s@%s' % (sym, dll)) imports[::2] = 0 # ordinal imports.emit_string(sym) imports[::1] = 0 |
From: <di...@us...> - 2003-05-21 12:43:22
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv9018 Modified Files: tran.py Log Message: explicitly specify UTF-8 encoding for Python Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 --- tran.py 21 May 2003 11:34:26 -0000 1.123 +++ tran.py 21 May 2003 12:43:13 -0000 1.124 @@ -1,4 +1,5 @@ #! /usr/bin/python +# coding: utf-8 #### tran.py - an NG Worth translator prototype # |
From: <di...@us...> - 2003-05-21 12:42:52
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv8607 Modified Files: pedump.py Log Message: open the dumpable executable in explicit binary mode Index: pedump.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pedump.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pedump.py 13 May 2003 21:30:55 -0000 1.6 +++ pedump.py 21 May 2003 12:42:43 -0000 1.7 @@ -20,7 +20,7 @@ if args: for filename in args: - f = open(filename, 'r') + f = open(filename, 'rb') def take (tpl): return ftake(f, tpl) print '=== MZ header ===' print 'MZ magic: %r' % f.read(2) |
From: <di...@us...> - 2003-05-21 12:25:29
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv30448 Modified Files: winapi.tran Log Message: wrote SetConsoleTitleA and SetConsoleTitleW Index: winapi.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/winapi.tran,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- winapi.tran 18 May 2003 17:25:28 -0000 1.4 +++ winapi.tran 21 May 2003 12:25:26 -0000 1.5 @@ -15,4 +15,10 @@ :[ ] ExitProcess \ ( code -- ) commit 'ExitProcess@kernel32 $call ; +:[ ] SetConsoleTitleA \ ( string -- result ) + commit 'SetConsoleTitleA@kernel32 $call %eax ; + +:[ ] SetConsoleTitleW \ ( string -- result ) + commit 'SetConsoleTitleW@kernel32 $call %eax ; + \ vim: ft=tran |
From: <di...@us...> - 2003-05-21 12:22:30
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv28484/users/dig Modified Files: Makefile.am Added Files: menuet.tran Log Message: added experimental menuet.tran --- NEW FILE: menuet.tran --- \\\\ menuet.tran - Menuet support routines \ \ Copyleft © 2003 by Andres Soolo (di...@us...) \ This file is licensed under the GNU GPL v2. If you \ don't know what that means, please do read the GPL. \ \\\\ @(#) $Id: menuet.tran,v 1.1 2003/05/21 12:22:27 digg Exp $ \ NOTE: this code is *not tested at all*. :[ ] make-menuetos-executable-header "MENUET01" times b, \ application id 1 t, \ header version '_start t, \ entry point '#menuet/image-size t, '#menuet/memory-top t, '#menuet/initial-sp t, '#menuet/param-pass (opt) t, \ ? '#menuet/icon-data (opt) t, \ "Reserved for icon" ; \ vim: ft=tran Index: Makefile.am =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/Makefile.am,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Makefile.am 20 May 2003 20:17:12 -0000 1.31 +++ Makefile.am 21 May 2003 12:22:27 -0000 1.32 @@ -13,7 +13,7 @@ i8080.tran z80.tran \ ia16.tran ia32.tran \ coff.tran elf.tran mz.tran pe.tran \ - winapi.tran \ + winapi.tran menuetos.tran \ hello.tran mswhello.tran doshello.tran cpmhello.tran \ makehello.py elfdump.py |
From: <di...@us...> - 2003-05-21 11:34:29
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv27396 Modified Files: tran.py Log Message: generate the output in explicit binary mode for Microsoft's merryment Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- tran.py 21 May 2003 10:44:55 -0000 1.122 +++ tran.py 21 May 2003 11:34:26 -0000 1.123 @@ -419,7 +419,7 @@ elif format == 'com': binary = apply(com.make_com_executable, [], argum) else: raise 'unknown output format', format - f = open(output_name, 'w') + f = open(output_name, 'wb') binary.get_file().tofile(f) f.close() |
From: <di...@us...> - 2003-05-21 10:44:58
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv24645 Modified Files: tran.py Log Message: resolved inheritance conflict wrt Class_Marker Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- tran.py 19 May 2003 08:35:18 -0000 1.121 +++ tran.py 21 May 2003 10:44:55 -0000 1.122 @@ -194,7 +194,7 @@ def contained_registers (this): return this, -class Class_Marker (object, Stackable): +class Class_Marker (Stackable): def __init__ (this, id): this.id = id def __str__ (this): |
From: <di...@us...> - 2003-05-20 20:44:36
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv4421 Modified Files: i8080.tran Log Message: implemented more i8080 instructions Index: i8080.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/i8080.tran,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- i8080.tran 20 May 2003 20:39:14 -0000 1.9 +++ i8080.tran 20 May 2003 20:44:31 -0000 1.10 @@ -46,5 +46,10 @@ :[ %hl ] $dec drop #x053 b, ; :[ %sp ] $dec drop #x073 b, ; +:[ ] $daa #x27 b, ; + +:[ %a ] $not drop #x2F b, ; + +:[ reg8 reg8 ] $mov minor swap minor 8 * + #o100 + b, ; \ vim: ft=tran |
From: <di...@us...> - 2003-05-20 20:39:18
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv2133 Modified Files: i8080.tran Log Message: implemented more i8080 instructions Index: i8080.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/i8080.tran,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- i8080.tran 20 May 2003 20:36:05 -0000 1.8 +++ i8080.tran 20 May 2003 20:39:14 -0000 1.9 @@ -36,4 +36,15 @@ :[ %hl ] $jmp drop #xE9 b, ; +:[ %bc ] $inc drop #o003 b, ; +:[ %de ] $inc drop #o023 b, ; +:[ %hl ] $inc drop #x043 b, ; +:[ %sp ] $inc drop #x063 b, ; + +:[ %bc ] $dec drop #o013 b, ; +:[ %de ] $dec drop #o033 b, ; +:[ %hl ] $dec drop #x053 b, ; +:[ %sp ] $dec drop #x073 b, ; + + \ vim: ft=tran |
From: <di...@us...> - 2003-05-20 20:36:08
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv575 Modified Files: i8080.tran Log Message: wrote |$jmp %hl| for i8080 Index: i8080.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/i8080.tran,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- i8080.tran 20 May 2003 20:22:35 -0000 1.7 +++ i8080.tran 20 May 2003 20:36:05 -0000 1.8 @@ -34,4 +34,6 @@ :[ %a reg8 ] $add minor #o200 + b, drop ; :[ %a reg8 ] $adc minor #o210 + b, drop ; +:[ %hl ] $jmp drop #xE9 b, ; + \ vim: ft=tran |
From: <di...@us...> - 2003-05-20 20:35:18
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv30707 Modified Files: z80.tran Log Message: wrote the |$add %ix %bc|, |$add %ix %de|, |$add %ix %ix|, and |$add %ix %sp| macros for z80 Index: z80.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/z80.tran,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- z80.tran 20 May 2003 20:17:12 -0000 1.1 +++ z80.tran 20 May 2003 20:30:13 -0000 1.2 @@ -10,4 +10,9 @@ :regs ireg %ix %iy ; +:[ %ix %bc ] $add drop drop #xDD b, #x09 b, ; +:[ %ix %de ] $add drop drop #xDD b, #x19 b, ; +:[ %ix %ix ] $add drop drop #xDD b, #x29 b, ; +:[ %ix %sp ] $add drop drop #xDD b, #x39 b, ; + \ vim: ft=tran |
From: <di...@us...> - 2003-05-20 20:29:41
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv28090 Modified Files: i8080.tran Log Message: wrote the |$add %a reg8| and |$adc %a reg8| macros for i8080 Index: i8080.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/i8080.tran,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- i8080.tran 19 May 2003 21:17:08 -0000 1.6 +++ i8080.tran 20 May 2003 20:22:35 -0000 1.7 @@ -31,4 +31,7 @@ :[ ] $ret #xC9 b, ; +:[ %a reg8 ] $add minor #o200 + b, drop ; +:[ %a reg8 ] $adc minor #o210 + b, drop ; + \ vim: ft=tran |
From: <di...@us...> - 2003-05-20 20:17:15
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv26039 Modified Files: Makefile.am Added Files: z80.tran Log Message: introduced z80.tran --- NEW FILE: z80.tran --- \\\\ z80.tran - Zilog's Z80 instructions \ \ Copyleft © 2003 by Andres Soolo (di...@us...) \ This file is licensed under the GNU GPL v2. If you \ don't know what that means, please do read the GPL. \ \\\\ @(#) $Id: z80.tran,v 1.1 2003/05/20 20:17:12 digg Exp $ needs i8080 \ the Z80 instruction set is a superset of i8080 instruction set :regs ireg %ix %iy ; \ vim: ft=tran Index: Makefile.am =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/Makefile.am,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Makefile.am 19 May 2003 14:56:50 -0000 1.30 +++ Makefile.am 20 May 2003 20:17:12 -0000 1.31 @@ -10,7 +10,7 @@ coff.py com.py elf.py pe.py \ tran.py tran-builtins tran-emitters builtin.tran \ i8086.tran i80186.tran i80286.tran i80386.tran i80486.tran pentium.tran mmx.tran \ - i8080.tran \ + i8080.tran z80.tran \ ia16.tran ia32.tran \ coff.tran elf.tran mz.tran pe.tran \ winapi.tran \ |
From: <di...@us...> - 2003-05-20 05:05:37
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv25315 Modified Files: pe.py pe.tran Log Message: made #aout/dll-flags default to 0 Index: pe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- pe.py 19 May 2003 14:19:20 -0000 1.30 +++ pe.py 20 May 2003 05:05:31 -0000 1.31 @@ -182,7 +182,6 @@ e.place_symbol('#aout/subsys-version-major', 4) e.place_symbol('#aout/subsys-version-minor', 0) e.place_symbol('#aout/subsys', PE_SUBSYS.WINDOWS_CHAR) - e.place_symbol('#aout/dll-flags', 0) e.place_symbol('#aout/stack-reserve-size', 1024 * 1024) # one megabyte e.place_symbol('#aout/stack-commit-size', 0x1000) # one page e.place_symbol('#aout/heap-reserve-size', 1024 * 1024) # one megabyte Index: pe.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.tran,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- pe.tran 19 May 2003 14:19:20 -0000 1.12 +++ pe.tran 20 May 2003 05:05:32 -0000 1.13 @@ -70,7 +70,7 @@ '!aout/header-end t, '#aout/checksum (opt) t, '#aout/subsys w, - '#aout/dll-flags w, + '#aout/dll-flags (opt) w, \ Known flags for #aout/dll-flags \ 0x0001 - per-process library initialization \ 0x0002 - per-process library termination |
From: <di...@us...> - 2003-05-19 21:17:20
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv11455 Modified Files: i8080.tran Log Message: implemented |$ei| and |$di| Index: i8080.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/i8080.tran,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- i8080.tran 19 May 2003 21:00:55 -0000 1.5 +++ i8080.tran 19 May 2003 21:17:08 -0000 1.6 @@ -26,6 +26,9 @@ :[ int ] $rst 8 * #o307 + b, ; +:[ ] $ei #xFB b, ; +:[ ] $di #xF3 b, ; + :[ ] $ret #xC9 b, ; \ vim: ft=tran |
From: <di...@us...> - 2003-05-19 21:00:58
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv27150 Modified Files: i8080.tran Log Message: implemented |$ret| for i8080 Index: i8080.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/i8080.tran,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- i8080.tran 19 May 2003 14:39:31 -0000 1.4 +++ i8080.tran 19 May 2003 21:00:55 -0000 1.5 @@ -26,4 +26,6 @@ :[ int ] $rst 8 * #o307 + b, ; +:[ ] $ret #xC9 b, ; + \ vim: ft=tran |
From: <di...@us...> - 2003-05-19 14:56:54
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv26537 Modified Files: Makefile.am pentium.tran Added Files: mmx.tran Log Message: extracted mmx.tran from pentium.tran --- NEW FILE: mmx.tran --- \\\\ mmx.tran - MMX instructions for ia32 \ \ Copyleft © 2003 by Andres Soolo (di...@us...) \ This file is licensed under the GNU GPL v2. If you \ don't know what that means, please do read the GPL. \ \\\\ @(#) $Id: mmx.tran,v 1.1 2003/05/19 14:56:50 digg Exp $ needs pentium :regs mmxreg %mm0 %mm1 %mm2 %mm3 %mm4 %mm5 %mm6 %mm7 ; \ vim: ft=tran Index: Makefile.am =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/Makefile.am,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Makefile.am 19 May 2003 08:35:18 -0000 1.29 +++ Makefile.am 19 May 2003 14:56:50 -0000 1.30 @@ -9,7 +9,7 @@ EXTRA_DIST = .cvsignore .pycheckrc struburn.wisp bits.py linkie.py \ coff.py com.py elf.py pe.py \ tran.py tran-builtins tran-emitters builtin.tran \ - i8086.tran i80186.tran i80286.tran i80386.tran i80486.tran pentium.tran \ + i8086.tran i80186.tran i80286.tran i80386.tran i80486.tran pentium.tran mmx.tran \ i8080.tran \ ia16.tran ia32.tran \ coff.tran elf.tran mz.tran pe.tran \ Index: pentium.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pentium.tran,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pentium.tran 18 May 2003 17:47:38 -0000 1.2 +++ pentium.tran 19 May 2003 14:56:50 -0000 1.3 @@ -8,8 +8,6 @@ needs i80486 -:regs mmxreg %mm0 %mm1 %mm2 %mm3 %mm4 %mm5 %mm6 %mm7 ; - :[ ] $cpuid #x0F b, #xA2 b, ; \ vim: ft=tran |
From: <di...@us...> - 2003-05-19 14:39:34
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv9072 Modified Files: i8080.tran Log Message: implemented |$nop| for i8080 Index: i8080.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/i8080.tran,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- i8080.tran 19 May 2003 09:20:47 -0000 1.3 +++ i8080.tran 19 May 2003 14:39:31 -0000 1.4 @@ -13,6 +13,8 @@ :regs reg16 %bc %de %hl %psw %sp ; \ Z80 calls %psw %af \ instructions +:[ ] $nop #x00 b, ; + :[ lit ] $jmp #xC3 b, w, ; :[ lit ] $call #xCD b, w, ; |
From: <di...@us...> - 2003-05-19 14:19:25
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv25589 Modified Files: pe.py pe.tran Log Message: cleaner PE headers via symbol defaults Index: pe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- pe.py 19 May 2003 13:54:50 -0000 1.29 +++ pe.py 19 May 2003 14:19:20 -0000 1.30 @@ -49,36 +49,17 @@ b.place_symbol('#mz/blocks-in-file', (b.filesz() + 0x1FF) / 0x200) return b -def populate_pe_directories (linkie, base, **given): - defaults = { - '&export-table': base, '#export-table/size': 0, - '&resource-table': base, '#resource-table/size': 0, - '&exception-table': base, '#exception-table/size': 0, - '!cert-table': 0, '#cert-table/size': 0, - '&base-rel-table': base, '#base-rel-table/size': 0, - '&debug-data': base, '#debug-data/size': 0, - '&arch-specific': base, '#arch-specific/size': 0, - '&global-pointer': base, - '&tls': base, '#tls/size': 0, - '&load-config-table': base, '#load-config-table/size': 0, - '&bound-import-table': base, '#bound-import-table/size': 0, - '&import-address-table': base, '#import-address-table/size': 0, - '&delay-import-descr': base, '#delay-import-descr/size': 0, - '&COM+-runtime-header': base, '#COM+-runtime-header/size': 0, - } - for sym, defval in defaults.items(): - if given.has_key(sym): linkie.place_symbol(sym, given[sym]) - else: linkie.place_symbol(sym, defval) - def make_pe_executable (text = None, data = None, bss = None, base_address = 0x00400000): e = Linkie('<'); e.glue(0, make_pe_mz_stub('OS too broken'), 0x100) if e.memsz() < 0x80: e.align(0x80) # attempt to create a file(1)-friendly exe + base_address = roundup(base_address, 0x1000) # to page boundary + e.place_symbol('#rva', -base_address) # adding this to an address will yield RVA do = Interpreter(e).do do('needs pe') - do('make-pe-header') + do(`base_address` + ' make-pe-header') text = text.copy() # so we won't add import stubs to the original linkie imports = Linkie('<') sectnames = ['.text', '.data', '.bss', '.imports'] @@ -153,7 +134,6 @@ # paste sections together e.align(512) - base_address = roundup(base_address, 0x1000) # to page boundary memory_boundary = base_address memory_boundary += 0x1000 # skip the first page for s in sectnames: @@ -190,7 +170,6 @@ e.place_symbol('#aout/data-size', roundup(data.memsz(), 0x200)) e.place_symbol('#aout/bss-size', roundup(bss.memsz(), 0x200)) e.place_symbol('#aout/image-base', base_address) - e.place_symbol('#rva', -base_address) # adding this to an address will yield RVA e.place_symbol('#aout/memory-align', 4096) e.place_symbol('#aout/file-align', 512) # 4.0 = MSW95 @@ -211,7 +190,6 @@ # Note that null RVAs are those that equal base_address e.place_symbol('#aout/dict-entry-count', 16) - populate_pe_directories(e, base_address) e.align(512) e.link() Index: pe.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.tran,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- pe.tran 19 May 2003 13:54:51 -0000 1.11 +++ pe.tran 19 May 2003 14:19:20 -0000 1.12 @@ -43,7 +43,7 @@ mingle #*/flags t, ; -:[ ] make-pe-aout-header +:[ ] make-pe-aout-header \ ( base-address -- ) \ &aout/image-end must be a multiple of #aout/memory-align \ !aout/header-end must be a multiple of #aout/file-align 4 align @@ -83,40 +83,41 @@ '#aout/heap-commit-size t, 0 t, \ loader flags -- obsolete '#aout/dict-entry-count t, - '&export-table '#rva + t, - '#export-table/size t, + '&export-table over by-default '#rva + t, + '#export-table/size (opt) t, '&.imports '#rva + t, '#.imports/memsz t, - '&resource-table '#rva + t, - '#resource-table/size t, - '&exception-table '#rva + t, - '#exception-table/size t, - '!cert-table t, - '#cert-table/size t, - '&base-rel-table '#rva + t, - '#base-rel-table/size t, - '&debug-data '#rva + t, - '#debug-data/size t, - '&arch-specific '#rva + t, - '#arch-specific/size t, - '&global-pointer '#rva + t, - 0 t, - '&tls '#rva + t, - '#tls/size t, - '&load-config-table '#rva + t, - '#load-config-table/size t, - '&bound-import-table '#rva + t, - '#bound-import-table/size t, - '&import-address-table '#rva + t, - '#import-address-table/size t, - '&delay-import-descr '#rva + t, - '#delay-import-descr/size t, - '&COM+-runtime-header '#rva + t, - '#COM+-runtime-header/size t, + '&resource-table over by-default '#rva + t, + '#resource-table/size (opt) t, + '&exception-table over by-default '#rva + t, + '#exception-table/size (opt) t, + '!cert-table (opt) t, + '#cert-table/size (opt) t, + '&base-rel-table over by-default '#rva + t, + '#base-rel-table/size (opt) t, + '&debug-data over by-default '#rva + t, + '#debug-data/size (opt) t, + '&arch-specific over by-default '#rva + t, + '#arch-specific/size (opt) t, + '&global-pointer over by-default '#rva + t, + 0 t, + '&tls over by-default '#rva + t, + '#tls/size (opt) t, + '&load-config-table over by-default '#rva + t, + '#load-config-table/size (opt) t, + '&bound-import-table over by-default '#rva + t, + '#bound-import-table/size (opt) t, + '&import-address-table over by-default '#rva + t, + '#import-address-table/size (opt) t, + '&delay-import-descr over by-default '#rva + t, + '#delay-import-descr/size (opt) t, + '&COM+-runtime-header over by-default '#rva + t, + '#COM+-runtime-header/size (opt) t, 0 t, 0 t, + drop \ discard base-address ; -:[ ] make-pe-header +:[ ] make-pe-header \ ( base-address -- ) 8 align \ PE header must be aligned to 8 label !pe "PE" times b, 0 w, \ magic |
From: <di...@us...> - 2003-05-19 13:54:55
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv7299 Modified Files: pe.py pe.tran Log Message: implemented |make-pe-header| Index: pe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- pe.py 19 May 2003 13:37:48 -0000 1.28 +++ pe.py 19 May 2003 13:54:50 -0000 1.29 @@ -76,13 +76,9 @@ e.glue(0, make_pe_mz_stub('OS too broken'), 0x100) if e.memsz() < 0x80: e.align(0x80) # attempt to create a file(1)-friendly exe - e.align(8) # PE header must be aligned to 8 - e.place_symbol('!pe') - e.emit_string('PE\0\0') - interpret_single('make-coff-header', e, include = 'coff') do = Interpreter(e).do do('needs pe') - do('make-pe-aout-header') + do('make-pe-header') text = text.copy() # so we won't add import stubs to the original linkie imports = Linkie('<') sectnames = ['.text', '.data', '.bss', '.imports'] Index: pe.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.tran,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- pe.tran 19 May 2003 13:41:32 -0000 1.10 +++ pe.tran 19 May 2003 13:54:51 -0000 1.11 @@ -7,6 +7,7 @@ \\\\ @(#) $Id$ needs mz +needs coff \ The result's assumed origin address is 0x100. :[ ] make-pe-mz-stub-structure \ ( -- ) no message itself @@ -113,6 +114,14 @@ '&COM+-runtime-header '#rva + t, '#COM+-runtime-header/size t, 0 t, 0 t, +; + +:[ ] make-pe-header + 8 align \ PE header must be aligned to 8 + label !pe + "PE" times b, 0 w, \ magic + make-coff-header + make-pe-aout-header ; \ vim: ft=tran |
From: <di...@us...> - 2003-05-19 13:41:37
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv29240 Modified Files: pe.tran Log Message: minor cleanup Index: pe.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.tran,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- pe.tran 19 May 2003 13:28:27 -0000 1.9 +++ pe.tran 19 May 2003 13:41:32 -0000 1.10 @@ -46,7 +46,7 @@ \ &aout/image-end must be a multiple of #aout/memory-align \ !aout/header-end must be a multiple of #aout/file-align 4 align - '#aout/magic w, #x10B =: #?aout/magic + '#aout/magic #x10B by-default w, '#aout/linker-version-major (opt) b, '#aout/linker-version-minor (opt) b, '#aout/text-size t, |