Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sub Fastcall behaviour
#1
I understand that if, for example, you pass an uByte parameter, it's put into the A register... But it seems that the parameter itself is not usable from BASIC. I don't know if this is intended, there's nothing about this in the doc.

Code:
Sub Fastcall test (n as uByte)
    Asm
        ld (40000),a
    End Asm
    Print n
        Print Peek (40000)
End Sub

test (16)

I expected this code to print 16 twice, but it outputs:

Code:
0
16

This is, the value of "n" is 0. In other scenarios, I get other values, not just 0.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)