Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 1996 14:38:52 -0400 (EDT)
From:      Marc Ramirez <mrami@mrami.com>
To:        chat@freebsd.org
Subject:   Jump to arbitrary label, intra-function
Message-ID:  <Pine.BSF.3.91.960808142957.9490D-100000@boner.mrami.com>

next in thread | raw e-mail | index | archive | help

I have some 6507 machine code that I'm trying to run on my PC because I 
don't have a 6507 anymore. :)  Software emulation just isn't cutting it, 
and I have been toying with the idea of writing a re-assembler.  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?  The first thought that popped into my mind was 
to construct a jump table, but I can't seem to take the address of a 
label.  Hmm...

I'm pretty sure I could play around with assembly to do it, but I also 
eventually want to run this on a DECStation, too. Anyone know of an 
ANSI way to do this?  Surely someone has come upon this problem before...

Marc.

--
Every improvement in communication makes the bore more terrible.
	-- Frank Moore Colby




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960808142957.9490D-100000>