Helpful Tid-Bits of Information About the ADAM
by ?


 

MISCELLANEOUS TID-BITS

The purpose of this column is to inform you of interesting little pieces of information that are not big enough subjects to warrant an article on its own. 
It may be a bug in the ADAM's software, or a 14 little-known feature of SmartBASIC, a useful system routine that can be CALL'ed from your Basic program, 
or a nifty little work-around for some nagging 'problem everyone seems to encounter.  If you have a neat trick would benefit others, that you think send 
it to us and we'll make sure you got credit for it. Here's a couple I bet you aren't aware of....

If you have ever tried to POKE a value into a memory above 53630, you know that it doesn't work. First thought that it was Read-Only memory.  Actually, 
it's only because SmartBASIC just won't do it for your protection. The limit is stored in 16149 and 16150. It you poke a value a 255 into both locations, 
you will be able to do a POKE anywhere you like!

Did you ever notice that every time you save a Basic program, all the REM and DATA statements grow by one character? SmartBASIC will always add a space 
after the words REM and DATA. YOU must be very careful with our Utilities since the assembly language routines are contained in DATA statements and are 
very long. Save it a few times you will first lose the 201 which is the machine code for RETURN.  To fix this situation, list the-line on the screen, 
run the cursor over the line number, space over the DATA (or REM) until you can retype the word in front of the original data, then run the cursor over 
the rest of the line.


CLOSING REMARKS

SERENDIPITY hopes you found this issue enjoyable and educational. we would appreciate your comments regarding any aspect of this publication. if you would 
like to see specific topics covered, please let us know and we'll try to discuss them in future issues. lastly, if you have any information about the ADAM 
system you would like to share with our readers, please feel free to send it to us.


Listing #2

PROGRAM POKEVM

DATE December 27, 1984

PURPOSE Pokes a character into VDP memory as many times as desired. The destination address, character count and ASCII character code must be poked into 
this routine before execution.

Byte		Decimal		Op		Argument		Comments
Count		Values		Code							
=============================================================================================================
1		245		PUSH		AF			Store registers that
2		197		PUSH		BC			we will be using
3		1  0  0		LD		BC, $00			Character count
6		62  0		LD		A, $00			Low byte of destination
8		211  191	OUT		$BF,A			Send it to VDP
10		62  0		LD		A, $00			High byte of destination
12		211  191	OUT		$BF, A			Send it to VDP
14		227		EX		(SP), HL		Time delay required by
15		227		EX		(SP), HL		by VDP for address
16		227		EX		(SP), HL		set up.
17		227		EX		(SP), HL
18		227		EX		(SP), HL
19		227		EX		(SP), HL
20		62  0		LD		A, $00			Ascii code to be printed
22		211  190	OUT		$BE, A			Send data to VDP
24		121		DEC		BC			Decrement the count
25		120		LD		A, B			Load "B" into "A" for compare
26		177		OR		C			If count isn't zero then
27		32  247		JR		NZ,$F7			go back through loop
29		193		POP		BC			Else restore registers
30		241		POP		AF			and return to BASIC
31		201		RET


Listing 03

PROGRAM 	PEEKV

DATE	December 27, 1984

PURPOSE	PEEKS a character from VDP memory.  The destination address must be poked into this routine before execution.

Byte		Decimal		Op		Argument		Comments
Count		Values		Code							
========================================================================================================
1		245		PUSH		AF			Store registers
2		62  0		LD		A, $00			Low byte of destination
4		211  191	OUT		$BF, A			Send it to VDP
6		62  0		LD		A, $00			High byte of destination
8		211  191	OUT		$BF, A			Send it to VDP
10		227		EX		(SP), HL		Time delay required by
11		227		EX		(SP), HL		set up.
12		227		EX		(SP), HL
13		227		EX		(SP), HL
14		227		EX		(SP), HL
15		227		EX		(SP), HL
16		219  190	IN		A, $BE			Get data to VDP
18		50  0  0	LD($0000),A				Basic rtn. will supply this
21		241		POP		AF			Restore register and
22		201		RET					return to Basic


The ADAM TECHNICAL JOURNAL is published bi-monthly by Serendipity Productions. Subscription rates are $15.00 per year in the U.S. and Canada, $20.00 per 
year in any other country, payable by check or money order only. Single issues are available for $3.00. All inquiries and payments should be made to 
Serendipity Productions, P.C. Box 07592t Milwaukee, WX 53207.

Preview of the next issue:
==========================

Making the most out of hi-res graphics.

Defining and moving graphics Sprites for animation.

Using the joysticks for graphics motion control

The second installation of the Basic Utility Library containing all the sprite control utilities

All concepts are demonstrated in an example program which does free-hand screen painting with the joystick.

More useful Tid-Bits of information.



 

Back to Top