Hallo, guten Tag.
Wie kommt man bitte bei GEOS an die 9 Byte vom PI-Wert der bei $100 liegt.
Die Adresse wird ja benutzt als Prozessorstack.
Es kommen bei mir andere Werte.
Wie kann man das solange sperren bis meine Daten bei $7f40 sind?
Danke.
Gruss
C
#include <geos.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <peekpoke.h>
struct window wholeScreen = {0, SC_PIX_HEIGHT-1, 0, SC_PIX_WIDTH-1};
unsigned int x;
unsigned int xx;
unsigned char y;
void basic_on(){
asm(" \
sei \
ldx #$37 \
stx $01 \
rts");
}
void basic_off(){
asm(" \
ldx #$36 \
stx $01 \
cli \
rts");
}
void adr_pi(){
asm(" \
lda #$a8 \
ldy #$ae \
");
}
void ram_fac(){
asm(" \
jsr 48034 \
rts");
}
void fac_str(){
asm(" \
jsr 48605 \
rts");
}
int main(void)
{
SetPattern(0);
InitDrawWindow(&wholeScreen);
Rectangle();
y=0;
xx=0x7f40+9;
InitForIO();
basic_on();
adr_pi();
ram_fac();
fac_str();
for (x=0x7f40; x<xx; x++) {
POKE(x,PEEK(0x100+y));
y=y+1;
}
basic_off();
DoneWithIO();
cgetc ();
return 0;
}
Alles anzeigen