Hi, I wrote the follow code for creare the PAINT BASIC with C:
void paint(unsigned char x, unsigned char y, char c) { __asm pop hl pop bc pop de dec sp pop af push af inc sp push de push bc push hl push af ld h, 4(ix) ld l, 5(ix) call #0x0069 ; ---> BIOS call for color the screen ld 6(ix),#0x9D call #0x0069 __endasm; }
my app.c is the follow:
#include "graphic.h" extern int x, y, a, b, ray, col; void (*function)() = (void (*)())0xc0; void main() { color(5,15,5); screen(5); paint(100,100,6); a=100; b=100; ray=50; col=2; circle(); while(1){}; }
If I compile the project I can see a circle but that it hasn't been colored with my paint().
I researched in the web how to create my paint with the right register and call but it doesn't work. Why?
Login sesión o register para postear comentarios