Path: utzoo!mnetor!uunet!husc6!necntc!rayssd!raybed2!crb From: crb@raybed2.UUCP (CHRIS BURTTON) Newsgroups: comp.sys.amiga Subject: Assembly routines in Basic Message-ID: <1133@raybed2.UUCP> Date: 9 Mar 88 12:38:39 GMT Organization: Raytheon Co., Bedford, Mass. Lines: 38 Keywords: Assembly Basic I'm trying to use some assembly language routines in my Basic program. I stick the code in an interger array and I then get the starting address of the code: for j=0 to 100 REM read the code from data statements read code%(j) next j Mac&=VARPTR(code%(0)) This gives me Guru's of either bad addressing or illegal instruction when the routine is called. The problem seems to be that the address of the code%(0) keeps moving aroung. It seems to move so much that I can get the address right before I call the routine and still jump to the wrong place when I call it: Mac&=VARPTR(code%(0)) CALL Mac& The routine is good. I check it with the Metascope Debugger. Also before I discovered the address was jumping around, I started using a routine that was nothing but a RTS. I don't want to use the Library routines via the .BMAP files (ala AllocMem). I would like the program to be just one file. Any ideas or hearsay or (hopefully) the straight dope would be greatly appreciated. Thanks, Chris Burton ...!linus!rayssd!raybed2!crb