Re: A83: What's wrong?


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

Re: A83: What's wrong?




I finnally got the program working.  The problem was instead of having "ld
a,(dy)" I had "ld (dy),a".  When this happened, the current value of the
accumulator was always the direction of x, so when the direction of x changed,
the direction of y also changed.
I'm now adding extra stuff.  So far I have added being able to change the
direction of the ball with the arrow keys, and I'm soon going to add contrast
changing, pause (maybe power-down).  I might also add the ability to save the
screen into a pic file.
I have a question, though.  In the ASMguru tutorial about contrast changing,
this is what it says:
"The current contrast is at 8008h in the RAM.  To use this number, you first
have to add 1Fh (31), then OR it with 0C0h (192) to get a number between 0D8h
(216) and 0FFh (255).  So to get the current contrast and increment it:
	ld   a,(8008h)
	add  a,18h
	inc  a		
	or   0C0h
	call lcd_busy
	out  (lcdinstport),a
All tutorials Copyright (c) James Matthews 1998, unless specified."
Here is my question, in the paragraph above the program, it says to add 1Fh,
and in the actually program, he adds 18h.  Which one is correct?  (I want to
make sure that it's right so I don't crash my calculator, I don't think the
emulator can do contrast.)]
-David