dickson@nunki.usc.edu (Jeffrey Dickson) (10/01/90)
I need some quick help here, if you please... I require a fragment of 65816 code to do the equivalent of the Monitor's Control-N command, that is, put the CPU in native mode from the ProDOS 8/ Applesoft environment. I've tried playing around with the XCE, SEC, and SEP instructions, but I couldn't find a combination that would change the x,m, and e bits. I know I'm missing something really simple here.... Thanx........ Jeff dickson@chaph.usc.edu
jb10320@uxa.cso.uiuc.edu (Desdinova) (10/01/90)
In article <12275@chaph.usc.edu> dickson@nunki.usc.edu (Jeffrey Dickson) writes: > >I need some quick help here, if you please... > >I require a fragment of 65816 code to do the equivalent of the Monitor's >Control-N command, that is, put the CPU in native mode from the ProDOS 8/ >Applesoft environment. I've tried playing around with the XCE, SEC, and SEP >instructions, but I couldn't find a combination that would change the x,m, and >e bits. I know I'm missing something really simple here.... > >Thanx........ Jeff Gee! An actual "How do I do this" question, instead of a bitch question. The code you're looking for looks like the following: clc xce ; put processor in native mode (allow 16-bit regs) rep #$30 ; actually invoke 16-bit registers To go back to emulation mode, do the following: sep #$30 sec xce Note that you need to preserve such beasties as the data bank and direct page registers. Your 65816 assembly manual should have something to say about that, I forget the exact instruction names. >dickson@chaph.usc.edu -- Jawaid Bazyar | Blondes in big black cars look better wearing Senior/Computer Engineering | their dark sunglasses at night. (unk. wierdo) jb10320@uxa.cso.uiuc.edu | The gin, the gin, glows in the Dark! | (B O'Cult) Apple II Users Unite! Storm the New Product Announcement and Demand Justice!
eej07047@uxa.cso.uiuc.edu (10/01/90)
It's either Sep #$20, Rep #$20, or Sep #$30, or Rep #$30 One set affects the A only (8 and 16), the other set changes both the X register and the Y register (including the A). I forgot which commands changes to 8 bits and which changes to 16, but you can probably figure that one out.