Re: [cc65] First steps

Date view Thread view Subject view

From: troy silvey (tbsilvey_at_juno.com)
Date: 2000-12-31 00:00:17


>Is there a special reason for avoiding pointers? Pointers are actually
>memory addresses, so using a pointer is the easiest solution.

That's me. Never go the easy way :)
I am curious if you have a smaller faster program when you
compile if you use some thing like.....

#define sprite1_x	 *((unsigned char*) 0xD000)
	
main()
	....
	sprite_x=0x00

instead of using pointers.
I have nothing against using pointers. This is just all part of my
curiosity and transition from asm to C.	
In the end, does the compiler see both the define substitution
and pointer use equal? Or will one give tigher code than the other?

>Or, even better, use the predefined structs from the C64 header file 
>(the struct definitions are actually in _vic.h, _sid.h ...):
>
>	#include <c64.h>
>
>	VIC.spr0_x = 0x00;

I saw your structures, very nicely done.
I was thinking that the structure allocation would use more
code and space when compiled though.
I'm thinking  with  more manual manipulation on my
part, it  might save space and execution time for the code.
Do you think it could, or am I wasting my time?

troy

 

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:37 CET