[Wisp-cvs] wisp/users/dig mz.tran,NONE,1.1 Makefile.am,1.21,1.22 pe.py,1.8,1.9 pe.tran,1.1,1.2 mz.py
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-17 14:54:44
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv1841 Modified Files: Makefile.am pe.py pe.tran Added Files: mz.tran Removed Files: mz.py Log Message: replaced pe.py by pe.tran --- NEW FILE: mz.tran --- \\\\ mz.tran - MZ-EXE generation \ \ 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: mz.tran,v 1.1 2003/05/17 14:54:41 digg Exp $ :[ ] make-mz-header #x4D b, #x5A b, \ magic ref #mz/bytes-in-last-block w, ref #mz/blocks-in-file w, ref #mz/reloc-count w, ref #mz/header-size w, ref #mz/low-memory-limit w, ref #mz/high-memory-limit w, ref #mz/ss w, ref #mz/sp w, ref #mz/checksum w, ref #mz/ip w, ref #mz/cs w, ref !mz/reloc w, ref #mz/overlay w, ; \ vim: ft=tran Index: Makefile.am =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile.am 17 May 2003 14:46:34 -0000 1.21 +++ Makefile.am 17 May 2003 14:54:41 -0000 1.22 @@ -9,7 +9,7 @@ EXTRA_DIST = .cvsignore .pycheckrc struburn.wisp bits.py linkie.py \ coff.py elf.py pe.py \ i8086.tran i80386.tran ia16.tran ia32.tran \ - coff.tran elf.tran pe.tran \ + coff.tran elf.tran mz.tran pe.tran \ winapi.tran \ hello.tran mswhello.tran \ makehello.py elfdump.py Index: pe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- pe.py 17 May 2003 14:46:34 -0000 1.8 +++ pe.py 17 May 2003 14:54:41 -0000 1.9 @@ -30,8 +30,7 @@ raise 'MZ message may not contain dollar signs', message if message.find('\r') == -1: # if no CRs, insert them message = '\r\n'.join(message.split('\n')) - b = make_mz_header() - interpret_single('make-pe-mz-stub-structure', b, include = 'pe') + b = interpret_single('make-pe-mz-stub-structure', '<', include = 'pe') message += '$' # Dollar the Terminator # a pointer to the PE signature must appear at the offset 0x003C Index: pe.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.tran,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pe.tran 17 May 2003 14:46:34 -0000 1.1 +++ pe.tran 17 May 2003 14:54:41 -0000 1.2 @@ -6,7 +6,11 @@ \ \\\\ @(#) $Id$ +include mz + +\ The result's assumed origin address is 0x100. :[ ] make-pe-mz-stub-structure \ no message itself + make-mz-header 0 =: #mz/reloc-count \ no relocation 0 =: #mz/header-size \ empty MZ header--load it all #x40 dup =: #mz/low-memory-limit =: #mz/high-memory-limit @@ -21,9 +25,9 @@ #x8C b, #xc8 b, \ mov %ax, %cs #x8E b, #xD8 b, \ mov %ds, %ax #xB4 b, 9 b, \ mov %ah, 9 - #xBA b, ref mz/message t, \ mov %dx, message + #xBA b, ref mz/message w, \ mov %dx, message #xCD b, #x21 b, \ int 0x21 - #xB8 b, #x4CFF t, \ mov %ax, 0x4CFF + #xB8 b, #x4CFF w, \ mov %ax, 0x4CFF #xCD b, #x21 b, \ int 0x21 ; --- mz.py DELETED --- |