Files
Sprinter-SDCC/tests/bankedbg/bank1.c
T
snark13 858e5755ad ChangeLog:
- big commit.
2026-06-10 10:35:48 +03:00

32 lines
752 B
C

#include <stdio.h>
#include <stdint.h>
#include <sprinter.h>
void bank1_func(int x) __banked
{
(void)x;
puts("BANK1: hello from a banked function (W1)!");
puts("BANK1: window 1 phys page = ");
hex8(_io_page_w1); /* should be BANK1's phys page */
putchar('\n');
putchar('1');
putchar('=');
putchar('0' + (x / 10) % 10);
putchar('0' + x % 10);
putchar('\n');
}
void bank1_func2(int x) __banked
{
(void)x;
puts("BANK1-2: hello from a banked function (W1)!");
puts("BANK1-2: window 1 phys page = ");
hex8(_io_page_w1); /* should be BANK1's phys page */
putchar('\n');
putchar('1');
putchar('=');
putchar('0' + (x / 10) % 10);
putchar('0' + x % 10);
putchar('\n');
}