Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!ptimtc!nntp-server.caltech.edu!toddpw From: toddpw@nntp-server.caltech.edu (Todd P. Whitesel) Newsgroups: comp.sys.apple2 Subject: Re: ML subroutines (passing parameters in ML) Message-ID: <1991Apr24.201753.4292@nntp-server.caltech.edu> Date: 24 Apr 91 20:17:53 GMT References: <3397@kluge.fiu.edu> <13845@ucrmath.ucr.edu> Organization: California Institute of Technology, Pasadena Lines: 23 rhyde@musial.ucr.edu (randy hyde) writes: >4) Pass parameters on the stack. This is how most HLLs pass parameters. >It is slow, big, and accessing the parameters is inconvenient, >especially on processors like the 65816 which don't have a frame pointer >register. What the ?? There IS a stack-register-relative addressing mode. Or you can do what Orca does: hop the stack pointer down to account for your autos, push the D register, and set D to the bottom of the auto space. This lets you use EVERYTHING on your autos and arguments (if the autos are larger than 256 bytes then it gets somewhat slower though), and is a lot more convenient (for large programs) than trying to cram all your globals in the direct page and use stack relative for autos and arguments. Randy, I sometimes get the distinct feeling that you rag on the 65816 because you're trying to use it as if it were just a 6502 with bigger registers, and gee things don't work too well that way... Todd Whitesel toddpw @ tybalt.caltech.edu