Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sub and function, asm and ix
when advancing a bit more on the MSX part of Boriel's ZX-Basic Compiler, and after that help from accessing paged memory on ZX-Spectrum 128k, i got this situation:

the library i used on the MSX "version"
sub msxvpoke(tad as uinteger,tva as uinteger)
    ld h,(ix+5)
    ld l,(ix+4)
    ld a,(ix+6)
    call $004D
    end asm
  end sub

there i'm seeing that sub is using 'ix' from the arguments, but i don't know how are they arranged (as ubyte, uinteger, etc.), and why or what for we use fastcall, get ix instead of bc,de,hl,af - and from a function, in which register or index the value is returned (af, just like from fastcall?)

i can't find documentation explaining it better on the wiki: <!-- m --><a class="postlink" href=""> ... C:FUNCTION</a><!-- m --> and <!-- m --><a class="postlink" href=""></a><!-- m -->

thanks and cheers! Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)