The main board has connection for video, audio, memory card, serial ram, commodore joystick and paddles.
My first purpose is to obtain an 80x25 textual video terminal and then to add tinybasic.
Actually, with C code, i have a screen with a max width of 44x25. To obtain 80x25 i wanted to replacte the following "slow" lines:
Code: Select all
if (scl & 1<<7) { videoDown; } else videoUp;
if (scl & 1<<6) { videoDown; } else videoUp;
if (scl & 1<<5) { videoDown; } else videoUp;
if (scl & 1<<4) { videoDown; } else videoUp;
if (scl & 1<<3) { videoDown; } else videoUp;
if (scl & 1<<2) { videoDown; } else videoUp;
if (scl & 1<<1) { videoDown; } else videoUp;
if (scl & 1<<0) { videoDown; } else videoUp;
videoUp;
I am not an expert of assembler.. the linker is blocking me and the project doesn't compile.
Attached there is the full code. Someone can help me to understand the problem ?
If someone wants to follow me in this project: i get 4 extra motherboards.. it is not possible to do a single pcb.. If you ask i will send you one for free. Just use it and let me know your results.
Code: Select all
__asm__ volatile
( "ldr r2,=0x40020010\n"
"ldr r3,=0x40020014\n"
"ldr r4,=0x020\n"
"ldr r0,=%0 \n"
"tst r0,#0x80\n" //con questa maledetta istruzione non compila..
"beq vdn1\n"
"str r4, [r3]\n"
"b v2\n"
"vdn1:\n"
"str r4, [r2]\n"
"v2:\n"
"tst r0, 0x40\n"
"beq vdn2\n"
"str r4, [r3]\n"
"b v3\n"
"vdn2:\n"
"str r4, [r2]\n"
"v3:\n"
"tst r0, 0x20\n"
"beq vdn3\n"
"str r4, [r3]\n"
"b v4\n"
"vdn3:\n"
"str r4, [r2]\n"
"v4:\n"
"tst r0, 0x10\n"
"beq vdn4\n"
"str r4, [r3]\n"
"b v5\n"
"vdn4:\n"
"str r4, [r2]\n"
"v5:\n"
"tst r0, 0x08\n"
"beq vdn5\n"
"str r4, [r3]\n"
"b v6\n"
"vdn5:\n"
"str r4, [r2]\n"
"v6:\n"
"TST r0, 0x04\n"
"beq vdn6\n"
"str r4, [r3]\n"
"b v7\n"
"vdn6:\n"
"str r4, [r2]\n"
"v7:\n"
"tst r0, 0x02\n"
"beq vdn7\n"
"str r4, [r3]\n"
"b v8\n"
"vdn7:\n"
"str r4, [r2]\n"
"v8:\n"
"tst r0, 0x01\n"
"beq vdn8\n"
"str r4, [r3]\n"
"b vend\n"
"vdn8:\n"
"str r4, [r2]\n"
"vend:\n"
"str r4, [r3]\n"
: : "r" (scl) : "r0","r2","r3","r4"
);