going through the help files for masm i found that i can take and use org $+300 to add 300 bytes in a perticular section. is there any way to say that if i want a code section to be 1000 bytes to do somthing like org 1000-$. or is there anyways to do that.
If you had a label at the start of the section, and assuming the label was L0 and you were trying to pad the section to 1000 bytes, then you could do something like this:
org 1000+L0
And the section would be padded with nulls.
Generally, the ORG statement is used in .COM files to specify the offset of the first instruction :
http://webster.cs.ucr.edu/Page_TechDocs/MASMDoc/ProgrammersGuide/Chap_03.htm
You can use the ORG directive to set the location counter in the current segment.
You can move the location counter forward or backward in the current segment.
format is : ORG "expression"
Where "expression" has to be:
- an constant
- and offset from an symbol in current segment
- and offset from the current location counter
"expression" can NOT be a forward reference symbol (a symbol not yet defined at the time of ORG)