05-31-2010, 04:27 PM
britlion Wrote:Wait, wait....Not exactly. I just copied by mistake the comment line of the SCREEN address function, but the function body is actually the ATTR address.
Boriel - the "attradrress" function you timed there is actually the SCREEN address code I listed above, not the attribute code...
Quote:I'm actually also still hopelessly confused with the changes you made to get the values out with pop. I've stared at that stack, and I don't see how two pops gets you values 5,6 and 7,8. Surely that gets you values 1,2 and 3,4.By values 5,6 etc... you mean (IX + 5) and (IX + 6)... don't you? :roll:
Guess I still haven't quite got the hang of how you stack variables. To the point where I'm writing putTile, and poking the screen address into a memory value instead of try to work out where it is. (in IX-3,4 apparently...)
Well, I think I've somewhat already explained it here.
Now, this is important:
FASTCALL convention call is like STDCALL but:
- The 1st parameter will be passed in the registers following the register convention (A => 8 bits, HL => 16 bits, DEHL => 32 bits AEDCB => 5 bytes, Float)
- If more parameters are specified, the compiler will issue a warning, and will push them onto the stack in *reverse order as in STDCALL.
- Finally the routine is called. But in the entry point, NOTHING is done to the IX register. Everything must be done by the user.