Jump to content
IGNORED

Quick assembler question


Tezz

Recommended Posts

Hi all,

 

I have a few small coding questions:

 

I am of course these days using Fox's great XASM which makes coding via the PC a nice experience although, I'm not totally familiar yet with the Quick Assembler as I used to use the very old Atari Assembler back then as I never got a MAC65 cartridge. There are a few differences with the syntax which I am now familiarising myself with. As well as trying to remember all of the 6502 that I once knew!

 

After looking through some XASM sourcecode, I was wondering about this command:

 

ror @ <---- I assume that this is (as the documentation states) marked with the @ as it is the accumulator addressing mode?

 

Can someone clarify exactly what this is doing?

 

Here is an example of a section of code

SETPOS	LDA $84

SEC 

SBC $B7

STA $84

AND #$03

STA $86

LDA $84

AND #$FC

CLC 

ror @

ror @

ADC $82

STA $8A

LDA $83

ADC #$00

STA $8B

LDA $85

AND #$07

STA $87

LDA $85

AND #$F8

CLC 

ror @

ror @

ror @

TAX 

CPX #$00

BEQ SETPOS2

SETPOS1	CLC 

LDA $8A

ADC #$30

STA $8A

LDA $8B

ADC #$00

STA $8B

DEX 

BNE SETPOS1

 

also, another very basic question.. in my old source code I could deifine bytes by..

 

LABEL

.byte $70,$70,$70

etc.

 

I have tried to replace this with..

LABEL

dta b $70,$70,$70

etc.

 

XASM compains that a label hasn't been defined on the line that contains the first dta b

 

should I just use

dta $70,$70,$70

 

:? As always, Any help is appreciated.

Link to comment
Share on other sites

:idea: Yes, it looks like 'ror @' means 'ror a' or simply 'ror'.

 

BTW:

   CLC 

  ror @ 

  ror @ 

  ror @

That's a perfect example of the programmer not knowing exactly what the opcode does and which opcodes are available too. Instead he could have written:

   lsr @ 

  ror @ 

  ror @

I have seen this mistake quite often in old code, probably the 650x documentation wasn't very complete.

Link to comment
Share on other sites

Some more help if possible..

 

I'm just now using Code Genie front end for XASM and have set-up the config file as Fox describes in the documentation. For some reason it's not generating the object file?

 

In the output window, I get "Running xasm.exe /p" and my path and source file is then listed correctly after this.

 

I then get "Process terminated successfully."

"Exit code 3"

 

And no object file is created??

 

the xasm.exe executable is in the same directory as code genie

 

:? Any ideas what I am doing wrong?

Link to comment
Share on other sites

do not know... but one problem i have discovered in the past was that code genie was configured in unix mode and not dos mode regarding CR/line end maybe this is causing the problem?

 

have you checked a dummy XASM program like putting simple colours on screen etc? just to see if the assembling works correctly?

 

will the object file being generated when using xasm manually?

Link to comment
Share on other sites

Thanks Heaven, I worked it out. It seems that either XASM has a limit to the path length to compile from or that one of my folder names had a space in it (I never normally do this :roll: ). I copied my whole Code-Genie/XASM folder to the raw C drive path and it works fine now.

Link to comment
Share on other sites

Any ideas what I am doing wrong?

 

I have following setup:

 

Code Genie is in:

 

D:EmuAtariXEUtil-PC-CGCode Genie 3.0>

 

Xasm is in:

 

D:EmuAtariXEUtil-PC-CG>

 

Also in above directory i have x-asm.bat. With following content:

 

d:emuAtariXEUtil-PC-CGxasm.exe %1 /l /o:blah.xex

 

In cgenie.conf i have following content:

 

AddUserTool Xasm D:emuAtarixeutil-pc-cgx-asm.bat $FP CaptureOutput

 

This works fine ;)

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...