🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari
Article #2333

--- HELP w/ SUPERCARTS! ---

#2333
From: nep.pgelhausen
Date: Sat, 01 Feb 1986 01:51
72 lines
2808 bytes
I am having a problem.  The following program SHOULD re-instate
an OSS "supercartridge" after being 'removed' by a similar program
(the only differences are between the SEI and the CLI).  When I
enter Action! from OS/A+ after turning the cart off & on w/ these
programs, I get MUCH garbage on screen (pretty lights, different
modes on each line!) & have to re-boot.  

I am not too good w/ assembly language & a borrowed entirely
some code from a similar program for turning the XL basics
on & off (published as DATA statements in Compute! & hand dis-
assembled.

Could someone tell me what I'm doing wrong here??

		-Richard Hartman
		max.hartman@ames-vmsb


;
; TURNON -- RESTORES AN OSS SUPERCART
;          "REMOVED" WITH TURNOFF
; 
;      COPYRIGHT RICHARD M. HARTMAN
;              JAN 1986
;
SAVBNK =       $CF     ; UNUSED BY OS
CLKLO  =       20      ; LO BYTE OF CLOCK
CURBNK =       $AFFF   ; SUPERCART BANK
RAMTOP =       $6A     ;
SEL    =       $D500   ; START OF BANK "SWITCHES"
ISCART =       $03FA   ; IS CART IN?
;
       ORG     $0600   ; PAGE SIX
;
START  LDA     CLKLO
TOP    CMP     CLKLO
       BEQ     TOP     ; WAIT FOR CLOCK TO CHANGE
;
       SEI             ; DISABLE INTERUPTS
;
       LDX     SAVBNK  ; RECALL SAVED BANK #
       STA     SEL,X   ; RE-INSTALL CART
;
       LDA     #1
       STA     ISCART  ; TELL OS CART IS IN
       LDA     $A0
       STA     RAMTOP  ; WE HAVE LESSMORE MEMORY NOW
;
       CLI             ; RE-ENABLE INTERUPTS
;
; CLOSE & REOPEN SCREEN DEVICE
; (DEVICE #0) TO RESET SCREEN TO
; NEW TOP OF RAM.  THESE NUMBERS 
; LIFTED FROM BASIC DATA STATEMENTS
; IN NOV '85 COMPUTE! MAGAZINE'S
; "INSIGHT: ATARI" COLUMN, WHICH
; SHOWED HOW TO DISABLE THE BUILT-IN
; BASIC IN THE XL/XE SERIES ATARIS.
;
       LDA #03         ; OPEN
       STA $0342       ; DEV 0 COMMAND BYTE
       LDA #LOW EDEV   ; DEV NAME LOW
       STA $0344
       LDA #HIGH EDEV  ; DEV NAME HI
       STA $0345
       LDX $00         ; AUX
       JMP $E456       ; OPEN SCREEN DEV
;      PERHAPS JSR INSTEAD?
       RTS             ; UNUSED IF ABOVE IS JMP
EDEV   DB  'E:',0

------
Technical Details
Message-ID: <8602010208.AA06534@ucbvax.berkeley.edu>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!info-atari

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!info-atari
From: nep.pgelhausen@AMES-VMSB.ARPA
Newsgroups: net.micro.atari
Subject: --- HELP w/ SUPERCARTS! ---
Message-ID: <8602010208.AA06534@ucbvax.berkeley.edu>
Date: Fri, 31-Jan-86 20:51:00 EST
Article-I.D.: ucbvax.8602010208.AA06534
Posted: Fri Jan 31 20:51:00 1986
Date-Received: Sat, 1-Feb-86 20:27:13 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: nep.pgelhausen@ames-vmsb.ARPA
Organization: The ARPA Internet
Lines: 72