Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!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 (Oops, I think I owe Randy a slight apology!) Message-ID: <1991Apr26.225542.5640@nntp-server.caltech.edu> Date: 26 Apr 91 22:55:42 GMT References: <3397@kluge.fiu.edu> <13845@ucrmath.ucr.edu> <112122@tut.cis.ohio-state.edu> <13954@ucrmath.ucr.edu> <1991Apr26.221735.4063@nntp-server.caltech.edu> Organization: California Institute of Technology, Pasadena Lines: 36 Sorry to follow my own article, but I just realized we are misinterpreting Randy's comments. [I wrote this] >Randy, now I'm convinced you're thinking like a 6502 assembly programmer. This is incorrect, but I realized it as I was skimming the article when it showed up in nn. I didn't try to cancel the post because I don't want to retype the gunk about Orca and the DBR trick. What Randy is thinking like is a RISC machine programmer, more specifically to emulate a zillion-register RISC machine on the 65816 using an aligned direct page. What I and I suspect many other on the group thought he was talking about was using the direct page for globals and scratch, and the stack relative for automatic variables -- I should have realized it because I said it myself earlier today in another thread, it's such a ludicrous idea that it couldn't have been the intended meaning, but when people don't see the reasonable interpretation right away they too readily assume the worst... The idea of using the DP as a RISC machine emulator has LOTS of merit. For one thing, it would be the only reasonable way to teach GCC the 65816, although I don't think any of us is up to messing with a behemoth like GCC. The main reservations I have about the idea are that function enter and exit could get really nasty, and that there is a hideous problem with using a fixed direct page for autos -- you can't safely pass pointers to them because they might be saved/restored by the called function. I suppose you could have all autos 'officially' on the stack, but that would be really gross and the floating dp would still be faster except for floating point calculations -- but are usually handed to SANE, and get done on an aligned dp. Todd Whitesel toddpw @ tybalt.caltech.edu