Champions_2002 #1 Posted February 27, 2014 i am looking through old Atari User magazaines and i came across an article on the USR function from the Nov 1987 issue The code looks like this 10 *=$600 20 PLA 30 LDA #0 40 STA 710 50 RTS I have compiled this with the Assembler Cartridge and i get error 6 on lines 10,30 and 40, also i have tried MADS and i get an error illegal instruction can anybody get this to work (it should only change the colour) Champions Quote Share this post Link to post Share on other sites
Pengwin #2 Posted February 27, 2014 How many spaces do you have between the line number and the rest of the line? You should have at least 2, otherwise it will see the mnemonic as a label, rather than code Quote Share this post Link to post Share on other sites
Champions_2002 #3 Posted February 27, 2014 (edited) How many spaces do you have between the line number and the rest of the line? You should have at least 2, otherwise it will see the mnemonic as a label, rather than code Yes i have 2 on lines 20,30,40 and 50 Edited February 27, 2014 by Champions_2002 Quote Share this post Link to post Share on other sites
Pengwin #4 Posted February 27, 2014 You also need at least 2 spaces on line 10. The asterisk is the equivalent of the ORG directive in some compilers, so it should be treated as a mnemonic as well. Quote Share this post Link to post Share on other sites
Pengwin #5 Posted February 27, 2014 Regarding MADS: It uses the org directive rather than the asterisk Quote Share this post Link to post Share on other sites
+bob1200xl #6 Posted February 27, 2014 You might want to check your line spacing again. You need two spaces between the line number and the first character of your instruction. ASM/ED is complaining about the goofy instructions after the labels on lines 10, 30, and 40. Bob Quote Share this post Link to post Share on other sites
ricortes #7 Posted February 27, 2014 10 *=$600 20 PLA 30 LDA #0 40 STA 710 50 RTS Copy and paste to your assembler. You may want to switch to 1) Using tabs rather then spaces. As several noticed, you only have one space between line number and label field. 2) Switch to using a program editor like Notepad++ as these will highlight labels. 1 Quote Share this post Link to post Share on other sites
Champions_2002 #8 Posted February 28, 2014 You also need at least 2 spaces on line 10. The asterisk is the equivalent of the ORG directive in some compilers, so it should be treated as a mnemonic as well. R yes i thought it would be different i just tried it . 10 *=$600 20 PLA 30 LDA #0 40 STA 710 50 RTS Copy and paste to your assembler. You may want to switch to 1) Using tabs rather then spaces. As several noticed, you only have one space between line number and label field. 2) Switch to using a program editor like Notepad++ as these will highlight labels. Thanks for that it now works for me Quote Share this post Link to post Share on other sites