hello, this "sta ($fb),y" not funktion in TRSE

You need an actual VIC.

Moderator: Moderators

Post Reply
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

hello, this "sta ($fb),y" not funktion in TRSE

Post by funkheld »

hello, this "sta ($fb),y" not funktion in TRSE

Code: Select all

procedure setchar();
begin
asm("
  lda #$00      
  sta $fb
  lda  #$10
  sta $fc
  lda  #1
  ldy  #0
  sta ($fb),y
  ");
end;
greeting
User avatar
AndyH
Vic 20 Afficionado
Posts: 364
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: hello, this "sta ($fb),y" not funktion in TRSE

Post by AndyH »

What you’ve written looks fine. I use that all the time in my bitmap code.

Are you sure $fb /fc is free to use ?
--
AndyH
HEWCO | Vic 20 blog
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: hello, this "sta ($fb),y" not funktion in TRSE

Post by funkheld »

hello, no loop with dasm.

with orgasm loop.

greeting
User avatar
AndyH
Vic 20 Afficionado
Posts: 364
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: hello, this "sta ($fb),y" not funktion in TRSE

Post by AndyH »

You could try declaring a pointer which will use one of these ZP addresses:
$02, $04, $08, $16, $0B, $0D, $10, $12, $22, $24, $68 *** note these are defined in the TRSE project settings, so you can change them to your own requirements.

p1: pointer;


and in the code you could try something like

Code: Select all

p1 := $1000;

asm("

  lda #1
  ldy #0
  sta (p1),y

");
or instead of the asm, p1[0] := 1;

That works for me.

Also, are you sure you have the screen at $1000 ?
--
AndyH
HEWCO | Vic 20 blog
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: hello, this "sta ($fb),y" not funktion in TRSE

Post by funkheld »

hello, thanks.

-------------------------------
Also, are you sure you have the screen at $1000 ?
--------------------------------
yes, this is 4096.

greeting
Post Reply