[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

2750.0. "Help needed - data to chip mem from assembler" by FORTY2::TATHAM (Nick Tatham @REO) Thu Jul 20 1989 07:45

I'm (actually my son is) just starting at writing assembler on the AMIGA -
using the ABACUS book, A68K asemebler and BLINK. I have an example program
that calls inutition and puts an image on the screen. The image data
doesn't get put into CHIP memory so, of course, it doesn't work. If I run
NoFastMem it works fine so there are (probably?) no other coding errors.

How can I force data into CHIP memory with A68K/BLINK? I've tried a 

	SECTION name, DATA, CHIP
	
but it didn't seem to work.

Any help is appreciated.

Nick

T.RTitleUserPersonal
Name
DateLines
2750.1It's reversed...FRAMBO::BALZERChristian Balzer DTN:785-1029Mon Jul 24 1989 08:3616
    
    Yeah, that's because you probably use version 1.01 or such of A68K.
    In this version the keywords CHIP and FAST are mixed up.
    Use 
    
    SECTION name, DATA, FAST 
    
    to get stuff into CHIP mem. Reverse is true for FAST mem.
    Wierd, isn't it? :-)
    
    This service message with the help of my fellow brewer and assembler
    guru of the Software Brewery, Heiko Rath.
    
    Regards,
    
    <CB>
2750.2One more...FRAMBO::BALZERChristian Balzer DTN:785-1029Mon Jul 24 1989 12:3710
    
    Uh, and I forgot to mention not to believe everything in an Abacus
    book. You should expect at least on serious bug per chapter.
    
    If you ever want to upgrade to a commercial assembler, check out
    C.A.P.E. from Innovatronics.
    It's written by the author of A68K and in it's newest release a
    quite powerful tool.
    
    <CB>
2750.3FORTY2::TATHAMNick Tatham @REOTue Jul 25 1989 07:016
Thanks for the advice. Actually we're using A68K version 2.42. We tried the
FAST keyword instead and it still didn't work. There must be more to it
than that.

Nick
2750.4Oops, Asm68K not A68K...FROCKY::BALZERChristian Balzer DTN:785-1029Tue Jul 25 1989 10:3412
    Re: *
    
    Blush...
    I'm sorry, but I goofed up here...
    I was talking about Asm68K and not A68K. Heiko will try to compile
    a program using A68K and see what happens...
    I'll keep you informed...
    
    Yours very confused,   ;-)
    
    <CB>
    
2750.5Try Asm68KFROCKY::BALZERChristian Balzer DTN:785-1029Tue Jul 25 1989 12:5312
    Re: .4
    
    As promised Heiko tried to compile a program with A68K. Unfortunately
    his efforts have not been rewarded with success by now, since A68K
    appears to miss out on some keywords and features some bugs. ;-)
    
    If you're willing to live with the minor bug mentioned in .1, try
    Asm68K on Fish #81. Works for us... :-)
    
    Regards,
    
    <CB>
2750.6dynamically allocate chip mem?AIAG::WISNERyou may ask yourself 'How do I work this?'.Wed Jul 26 1989 16:4210
    You could always do it the way us C programmers have to:
    
      -call the AllocMem function to allocate a block of chip memory.
      -copy your data to chip memory.
    
       
    It uses twice as much memory but it's a sure fire way to get your
    program working.
    
       
2750.7New ways for Lattice CTLE::RMEYERSRandy MeyersWed Jul 26 1989 17:0415
Re: .6

>    You could always do it the way us C programmers have to:
>    
>      -call the AllocMem function to allocate a block of chip memory.
>      -copy your data to chip memory.

Naw.  We C programmers (at least Lattice V5 C programmers) use the
new __chip keyword to control our storage layout.

In days gone by, (Lattice V3.10 and Lattice V4) I use to use the
"put the initialized data segment into chip memory" feature of
the compiler.

Of course, the old AllocMem and copy method works as well.
2750.8ELWOOD::PETERSWed Jul 26 1989 17:0811
    
    re .6
    
    	You shouldn't lump all C programmers together. Lattic V5 and
    above has a CHIP modifier for variables. This forces the variable
    to be loaded into CHIP memory.
    	I did do it the other way until V5.
    
    
    		Steve
    
2750.9BAGELS::BRANNONDave BrannonWed Jul 26 1989 20:256
    
    how about using fixhunk to force the program to use chip memory?
    
    A gross hack but hey it even works for programs written in C  :-)
    
    -Dave