Jump to content

Include a file: Difference between revisions

m
m (→‎{{header|6502 Assembly}}: added more examples and demonstrated the difference between include and incbin)
Line 42:
</pre>
 
As you can see, when <code>incbin</code> was used the assembler made no attempt to translate the assembly mnemonic into machine instructions. While anything that <code>incbin</code> can do, <code>include</code> can do also, using data blocks, it is often much easier to use <code>incbin</code> if you have a separate graphics creation program that can output graphics data into a raw binary form. Graphics data often contains hundreds of redundant bytes which can be very painful and time-consuming to type by hand.
 
Unlike high-level languages, the location of the <code>include</code> or <code>incbin</code> statement matters. This of course depends on the assembler, but generally speaking, there are a few limitations:
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.