Re: A86: Many Stupid Questions


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

Re: A86: Many Stupid Questions




At 07:51 PM 8/18/98 -0700, you wrote:
>
>I just started Asm, and I understand very little of what I've seen of
>it, so I'll probably be dumping a lot of seemingly idiotic questions
>onto the email lists periodically...
>For starters:
>
>1.    If you run a program that turns the calc off, does the program
>continue where it left off when the calc is turned on again?

Most of the time :)
A bit of code:
	ld      a,1						
	out     ($03),a            ;output low power state to port 3
    
	ld      a, $0b
	HALT				;wait til something happens
	out     ($03),a		;turn the calc back on
	res     4,(IY+$09)		;tell the calc that on was not pressed
	jp      WhereWeWannaGo

This little example shuts the calc off, and then when on is pressed, it
turns it back on, then it jups to WhereWeWannaGo.

>2.    What are shadow registers for?

Shadow registers are for saving the registers before executing another
program from your program.  When the other program returns from execution,
the registers are restored, so your program can continue execution without
loss of important info.

>3.    Is it possible to adjust the contrast of individual pixels, or do
>you have to adjust the contrast of the whole screen?

Unfortunatly, only the whole screen.
U use Port 2 for that.
A bit of code:

ContDown:
	ld      a,($C008)		;since port 2 is read only, we must get the 	
	dec     a			;current contrast from a memory address
	ld      ($C008),a		;decriment it, then load it back to the mem
	out     (2),a			;and to the port also
	ret				;return to calling code

It is important that u load the new contrast to both places, else bad
things can happen!!

Later,
CHICANE
ICQ: #14727618
chicane on EFNET #ti
Homepage: Under Construction.


Follow-Ups: References: