Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 1996 22:29:21 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        chat@freebsd.org
Cc:        mrami@mrami.com (Marc Ramirez)
Subject:   Re: Jump to arbitrary label, intra-function
Message-ID:  <199608082029.WAA02187@uriah.heep.sax.de>
In-Reply-To: <Pine.BSF.3.91.960808142957.9490D-100000@boner.mrami.com> from Marc Ramirez at "Aug 8, 96 02:38:52 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Marc Ramirez wrote:

>   The 
> problem comes when I try to write JSR/RTS in C.  JSR is easy enough; push 
> the 6507 PC and do a goto; RTS is trickier... how do I translate a 6507 
> PC back into a C label?

Don't use labels.  Either, use C functions directly, or implement a
software stack.  (If you catch the SIGSEGV, you can even extend the
stack dynamically.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608082029.WAA02187>