[Coco] disable reset button

Robert Gault robert.gault at worldnet.att.net
Wed Feb 23 16:57:01 EST 2005


If anyone has access to Hot Coco, Nov. 1985, they will see an article I 
wrote on this subject. I used a short ml routine to create new reset 
vectors which could be used to jump to any desired line number in a 
Basic program. The source will need updating for a Coco3.

* Tame Your Reset Button
* by Robert Gault 2/2/85

	ORG $72
	FDB RESET
* Place to suit but use Basic CLEAR to protect used space.
	ORG $7F00
LNNUM	RMB 2	Line number
FLAG2	FCB 0	graphics flag
LNLOC	RMB 2	Line Local
FLAG	FCB 0	reset

RESET	NOP	required
	LDD LNUM,pcr
	JSR $AD03	find
	BCS VECTOR
	COM FLAG,PCR
	LDD $47
	SUBD #1
	STD LNLOC,PCR	contents will vary based on the Coco ROMs

VECTOR	LDD #$444B	DK
	CMPD $C000
	BNE V1
	JMP $C0D4	change to $C0E7 for DOS1.1
V1	LDD #$4558	EX
	BNE V2
	JMP $80C0
V2	JMP $A0E8

RESTRT	PSHS CC
	TST FLAG,PCR
	BEQ EXIT
	PULS CC
* CLEAR RESTART
	CLR FLAG,PCR
* TEST FOR GRAPHICS
	TST FLAG2,PCR
	BEQ TEXT
	LDD #$4558
	CMPD $8000
	BNE TEXT
* PMODE SCREEN CALL
	JSR $95CF
* LOAD LINE RESTART IN regX
TEXT	LDX LNLOC,PCR
* INDICATE DIRECT MODE
	ANDCC #$AF
* EXECUTE LINE
	JMP $ADA7
EXIT	PULS CC,PC

* CHANGE INPUT VECTOR
	ORG $182
	FCB $7E	JUMP
	FDB RESTRT
	END

I then started my Basic program with
0 CLS:CLEAR 2000,&H7F00:LOADM"RESET":GOTO2
1 POKE&H7F00,LN/256:POKE&H7F01,LN-256*INT(LN/256):POKE&H7F02,SC:RETURN
2 LN={desired line number}:SC={0=text, 1=graphics}:GOSUB1

Robert Emery wrote:
>>does anybody in the group know the poke to disable the reset button or know 
>>a link to find it 
>>
> 
> It's a hardware reset. You can't disable the switch with any POKEs, but you can
> look in the Unravelled book(s) to find the reset vectors, which you can change
> as Mark pointed out.
> 
> Some RSDOS overlays (ie. Alan DeKok's Custom CoCo Basic) add an ON RESET
> command, which works just like ON BRK or ON ERROR GOTO.
> 
> Bob
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Read only the mail you want - Yahoo! Mail SpamGuard. 
> http://promotions.yahoo.com/new_mail 
> 



More information about the Coco mailing list