Jump to content
IGNORED

USR function code not working


Recommended Posts

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

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...