A83: Protection XOR prog


[Prev][Next][Index][Thread]

A83: Protection XOR prog




This program was designed to change whatever protection mode a program
has to it's opposite (protected->normal and vise versa).  Could someone
tell me what's wrong with it?

BTW: Sorry Jimmy, your prog takes up way too much space for such a small
task .  I trried to see if I could learn something from your source, but
it is confusing :  (

--Thanks

.NOLIST
#include "master_m.inc"
.LIST

.org $9327


	call	_zeroop1	; 0->op1
	ld	a,tans		; load A with Ans
	ld	(op1+1),a	; load byte after start of op1 with
Ans
	call	_findsym	; look for prog
	jp	c,_errundefined	; error if not there
	ld	a,(hl)		; load A with obj #
	and	%00011111	; Required bit mask
	inc	a		; A+1->A
	cp	PROTPROGOBJ	; is it protected now?
	jp	z,DoneAdding	; then it's done
	ld	a,PROGOBJ	; or else it will be normal
DoneAdding:
	ld	(hl),a		; load HL with new obj #
	call	clrLCDfull	; clear screen
	call	_homeup		; goto upper left corner
	ld	hl,Title	; point HL to string
	call	_puts		; display string
	ld      hl,10*256+23	; load pencol/penrow #'s to HL
	ld      (PENCOL),hl	; store to pencol/penrow
	ld	hl,Author	; point HL to string
	call	_vputs		; display string
	ret
Title:
 .db "    ZXORPROT    ",0
Author:
 .db "By Mastermind",0
.end
.end

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]