Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv23762
Modified Files:
make-pe-exe.py
Log Message:
use cleaner syntax
Index: make-pe-exe.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- make-pe-exe.py 11 May 2003 06:22:25 -0000 1.35
+++ make-pe-exe.py 11 May 2003 06:50:38 -0000 1.36
@@ -30,16 +30,15 @@
b[::2] = 0x40, 0x40 # low and high memory limits in paragraphs
b[::2] = -0x10, 0x100 # initial SS, SP
b[::2] = 0 # no checksum
- b.emit_wyde_sum(['&mz/_start']) # initial IP
- b.emit_wyde(-0x10) # initial CS
- b.emit_wyde(0) # relocation table offset
- b.emit_wyde(0) # not an overlay
+ b[::2] = '&mz/_start', -0x10 # initial IP, CS
+ b[::2] = 0 # relocation table offset
+ b[::2] = 0 # not an overlay
b.place_symbol('&mz/_start')
- b.emit_string('\x8C\xC8\x8E\xD8') # mov %ax, %cs; mov %ds, mov %ax
- b.emit_string('\xB4\x09') # mov %ah, 0x09
- b.emit_byte(0xBA); b.emit_wyde_sum(['&mz/message']) # mov %dx, message
- b.emit_string('\xCD\x21') # int 0x21
- b.emit_string('\xB8\xFF\x4C\xCD\x21') # mov %ax, 0x4CFF; int 0x21
+ b[::1] = 0x8C, 0xC8, 0x8E, 0xD8 # mov %ax, %cs; mov %ds, mov %ax
+ b[::1] = 0xB4, 0x09 # mov %ah, 0x09
+ b[::1] = 0xBA; b[::2] = '&mz/message' # mov %dx, message
+ b[::1] = 0xCD, 0x21 # int 0x21
+ b[::1] = 0xB8, 0xFF, 0x4C, 0xCD, 0x21 # mov %ax, 0x4CFF; int 0x21
message += '$' # Dollar the Terminator
# a pointer to the PE signature must appear at the offset 0x003C
|