Page 2 of 2

Posted: Mon May 05, 2008 9:44 pm
by Dex
david wrote:
Dex wrote:What does this assemble too ?

Code: Select all

.model tiny
.code
.386
start:
    xor ax, ax
    org 1024
    org 64511                        
    db 0
If it will allow it.
org 64511
db 0
The byte's offset is 64511, not (64511 + 1024).
The logic is this

Code: Select all

.model tiny
.code
.386
start:
    xor ax, ax
    org 1024 ; you have code above, random size, so we know this is 1024 ;bytes from  start of program
    org 64511   ; Then we know this should be  64511 bytes + 1024 bytes                     
    db 0            ; 1 byte, so 1024 + 64511 + 1 = ????????????????
I make it 64k, unless masm will not let you stack org ?.

Try this

Posted: Thu May 15, 2008 8:50 am
by DeletedAccount
I do not think there is any need of programming for this just use the existing tools .....

eg

Code: Select all

dd if=/dev/zero of=output.com bs = 1k count = 64
dd if=myfile of=output.com  conv = notrunc