Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!hplabs!hpda!jrg From: jrg@hpda.UUCP (Jeff Glasson) Newsgroups: net.micro.cbm Subject: Re: Commodore 64 Stack Message-ID: <1385@hpda.UUCP> Date: Wed, 23-Apr-86 13:18:52 EST Article-I.D.: hpda.1385 Posted: Wed Apr 23 13:18:52 1986 Date-Received: Sat, 26-Apr-86 03:14:58 EST References: <493@unccvax.unccvax.UUCP> <1377@hpda.UUCP> <341@bnrmtv.UUCP> Reply-To: jrg@hpda.UUCP (Jeff Glasson) Distribution: net Organization: Hewlett-Packard Co., Cupertino, CA Lines: 25 In article <341@bnrmtv.UUCP> fox@bnrmtv.UUCP (Richard Fox) writes: >> In article <493@unccvax.unccvax.UUCP> jeh@unccvax.UUCP (Jeffrey Holman) writes: >> > >> > Can anyone tell me if there is a way to reset the stack pointer in ML? >> >I want to move the location of the stack to some bigger area of memory for >> >use in a possible compiler. I am afraid that this is impossible since I >> >have been unable to find any reference to the stack pointer location in >> >memory. >> >> The 6502 processor processer only has an 8-bit stack pointer. >> The high order 8 bits are hardwired into the CPU to be page 1 of >> memory (address $0100 to $01ff). >> There is no way to change this. >> > >But can't you create your own You can define a 16-bit zero page variable to be something like a stack pointer, but then you must write some assembler macros to do stack operations. The stack manipulation opcodes (JSB, PHA, PLA, etc.) only work with the hardware stack. Jeff Glasson Hewlett-Packard ISO ucbvax!hpda!jrg