Newsgroups: comp.sys.cbm Path: utzoo!utgpu!jarvis.csri.toronto.edu!godzilla.ele.toronto.edu!leblanc From: leblanc@godzilla.ele.toronto.edu (Marcel LeBlanc) Subject: Re: Pet to C64 BASIC conversion Message-ID: <1988Feb22.002529.7621@jarvis.csri.toronto.edu> Summary: BASIC 4.0 Tokens Organization: EECG, University of Toronto References: <3295@cup.portal.com> Date: Mon, 22-Feb-88 00:25:29 EST In article <3295@cup.portal.com> Brendan@cup.portal.com writes: > > A friend of mine is trying to convert a program in PET basic to c-64 bsic.. > ... > 3790 GOSUB"CONPAST" > 3800 RESTORE"CON"TO"CONPAST" > 3810 V$="CON,SEQ,WRITE" > 3820 GOTO3840 > 3830 V$="GAME"+STR$(N)+",SEQ,WRITE" > 3840 OPEN 1,8,2,V$ > > Lines 3790 and 3800 are the big problem..it doesn't use any machine ... > BK The problem results from listing keywords which are available in BASIC 4.0 but not in BASIC 2.0. If you listed the program on a PET, the two lines in question would make sense. The highest value defined for a token in BASIC 2.0 is $CB. If values higher than this are present, LIST seems to take the keyword for (TOKEN-$4C). This would mean that the two lines would have been as follows in BASIC 4.0: 3790 SCRATCH"CONPAST" 3800 RENAME"CON"TO"CONPAST" These can be translated directly to commands sent to the drive error channel via a PRINT# command. -- Marcel A. LeBlanc University of Toronto -- Toronto, Canada also: LMS Technologies Ltd, Fredericton, NB, Canada