more samples

This commit is contained in:
drmortalwombat 2021-12-27 22:48:42 +01:00
parent b09c5c769e
commit a64f771d0c
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,40 @@
#include <c64/vic.h>
#include <stdlib.h>
#include <stdio.h>
// make space until 0x2000 for code and data
#pragma region( lower, 0x0a00, 0x2000, , , {code, data} )
// then space for our custom charset
#pragma section( charset, 0)
#pragma region( charset, 0x2000, 0x2800, , , {charset} )
// everything beyond will be code, data, bss and heap to the end
#pragma region( main, 0x2800, 0xa000, , , {code, data, bss, heap, stack} )
#pragma data(charset)
char charset[2048] = {
#embed "../resources/charset.bin"
}
#pragma data(data)
char x;
int main(void)
{
// map the vic to the new charset
vic_setmode(VICM_TEXT, (char *)0x0400, charset)
for(int i=0; i<10; i++)
printf(p"%D Hello World\n", i);
return 0;
}

View File

@ -1,2 +1,3 @@
..\..\bin\oscar64 largemem.c ..\..\bin\oscar64 largemem.c
..\..\bin\oscar64 allmem.c ..\..\bin\oscar64 allmem.c
..\..\bin\oscar64 charsetlo.c

Binary file not shown.