View Single Post
Old 22 September 2019, 18:47   #6
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Ok, two possibilities:

1) the exe is fully pc relative, so you do not need to relocate it.
Simply strip the header (at start and end of the binary).
Then assemble:

Code:
bb:
  dc.b 'DOS',0
  dc.l checksum
  dc.l $370
start: incbin "your.exe"
If you want to launch system you need a little stub at end.

2) relocate the exe at some fixed location.
Then:
Code:
bb:
  dc.b 'DOS',0
  dc.l checksum
  dc.l $370
start: copy bin to right location
bin: incbin "your.exe"
But an real example sure is better
ross is offline  
 
Page generated in 0.04917 seconds with 11 queries