Skip to content

How to create bin files? #65

Answered by drmortalwombat
tenprint asked this question in Q&A
Discussion options

You must be logged in to vote

You need some boilerplate to avoid the runtime:

#pragma section( startup, 0)
#pragma region( startup, 0xc000, 0xd000, , , {startup})
#pragma region( main, 0xc000, 0xd000, , , {code, data, bss, heap, stack} )
#pragma heapsize(0)
#pragma stacksize(0)
__asm startup
{}
#pragma startup(startup)


__export char data[128] = {1, 2, 3, 4, 5, 6};

You can then compile without runtime:

oscar64 -tf=bin -rt= raw.c

An alternative solution would be to use overlays:

#pragma overlay( ovl1, 1 )
#pragma section( bcode1, 0 )
#pragma section( bdata1, 0 )
#pragma region(bank1, 0xc000, 0xd000, , 1, { bcode1, bdata1 } )

#pragma data ( bdata1 )
__export char data[128] = {1, 2, 3, 4, 5, 6};
#pragma data ( data )…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tenprint
Comment options

Answer selected by tenprint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants