Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!asuvax!mcdphx!hrc!gtephx!campbellb From: campbellb@...!asuvax!gtephx (Brian Campbell) Newsgroups: comp.sys.apple2 Subject: Re: ML subroutines (passing parameters in ML) Summary: Yes, but... Message-ID: <1991May2.154829.1842@...!asuvax!gtephx> Date: 2 May 91 15:48:29 GMT References: <3397@kluge.fiu.edu> <13845@ucrmath.ucr.edu> <1991Apr30.170428.17156@nevada.edu> Organization: gte Lines: 13 In article <1991Apr30.170428.17156@nevada.edu>, alfter@nevada.edu (SCOTT ALFTER) writes: > In article <1991Apr29.203359.250@...!asuvax!gtephx> campbellb@...!asuvax!gtephx (Brian Campbell) writes: > >on the 6502). It looks like this: (i,S) which I take to mean, access the > >word at offset i relative to the Stack pointer. > Not present on the 6502? You could always do a TSX followed by a > LDA $100,X to do that. (Want even more random access? The stack is > in a fixed location; just grab a byte anywhere from $100 to $1FF.) True, but what I meant was an addressing mode supported in single instruction, and *relative* to the stack pointer. The TSX, LDA $100,X is a neat trick though, although it takes 4 bytes vs. 2 for an LDA (i,S) in the 65816. Grabbing a byte via LDA $1xx is rarely useful, because you generally need to access relative (the R word again) to the Stack pointer.