Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jb10320 From: jb10320@uxa.cso.uiuc.edu (Desdinova) Newsgroups: comp.sys.apple2 Subject: Re: Assembly Assistance Message-ID: <1990Oct1.014717.4793@ux1.cso.uiuc.edu> Date: 1 Oct 90 01:47:17 GMT References: <12275@chaph.usc.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 37 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!