Jump to content

Photo

Best 6502 assembler for a newbie?

mads atasm 6502 assembler beginner

43 replies to this topic

#26 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Sat Jul 23, 2016 11:08 AM

Thank you Draco!

 

Yes. I know that 16-bits addressed HD is slightly faster then 8-bit addressed RD.

(I dreamed about it from 2005 and you advised me to contact jurek etc),

but my unit lost it's battery and it seemes to me that it can't be replaced.

 

Now I use Lenore's SuperSDX and evidently awaiting SDX upgrade.

All of SDXer's use 448 beta, but me... :skull:

 

Yesterday I set up PCLINK with RespeQT -> Superthing!

(Very poor documentation as from pclink side as from respeqt side.)

 

I hope that PCLX: devices will obtain it's letter-number naming in future DOS releases. :grin:

 

MAE does not like long device naming.

 

Really MAE is a step to cosmos! It's very fast and it's created for people.

 

Best wishes from Moscow!

EZ



#27 drac030 OFFLINE  

drac030

    Stargunner

  • 1,836 posts
  • Location:Warszawa, Poland

Posted Sat Jul 23, 2016 2:12 PM

Yes. I know that 16-bits addressed HD is slightly faster then 8-bit addressed RD.


The data register size actually does not matter much. Ramdisks are slower because they usually use an intermediate buffer while copying data, which hard disks drivers do not need to do.
 

but my unit lost it's battery and it seemes to me that it can't be replaced.


The battery can always be replaced. If in doubt, write to simius for instructions.
 

All of SDXer's use 448 beta, but me... :skull:


Certainly not all :P And, besides, 4.48-betas are gone already. ;)
 

I hope that PCLX: devices will obtain it's letter-number naming in future DOS releases.
 
MAE does not like long device naming.


Unfortunately, it does not. This assembler is very good but has few annoying shortcomings worth fixing. Unfortunately, the source is not available, it should be reverse engineered.

#28 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Sat Jul 23, 2016 2:18 PM

Hi there!

I said slightly faster...

 

:)

 

I'll try to ask simius... The battery sits so firmly that I'm afraid break mobo.



#29 fujidude ONLINE  

fujidude

    Quadrunner

  • 5,184 posts
  • Location:United States of America

Posted Sat Jul 23, 2016 3:01 PM

I only have SDX 4.47.  I eagerly anticipate 4.48.



#30 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Thu Jul 28, 2016 8:47 AM

But why?



#31 fujidude ONLINE  

fujidude

    Quadrunner

  • 5,184 posts
  • Location:United States of America

Posted Thu Jul 28, 2016 10:07 AM

But why?

 

Because I really love SDX 4.47, and I'm confident 4.48 will only improve on it.  And guess what?  It was just released and I do like it even better!



#32 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Sat Jan 21, 2017 6:03 AM

Hi, Friends!

 

Here some code which I can't run.

 

It's a translation from MAC/65 code for MAE.

I can not understand what's wrong here.

; ls Command Demo
        .ou ls.com

; Atari Equates
CIOV      = $e456
RUNAD     = $02e0

; Atari Constants
CLS       = $7D
EOL       = $9b

; CIO Equates
IOCB     .or    $0340
ICHID    .ds    1 ; Handler
ICDNO    .ds    1 ; Number
ICCOM    .ds    1 ; Command
ICSTA    .ds    1 ; Status
ICBAL    .ds    1 ; Lo BufAdr
ICBAH    .ds    1 ; Hi BufAdr
ICPTL    .ds    1 ; Lo PutAdr
ICPTH    .ds    1 ; Hi PutAdr
ICBLL    .ds    1 ; Lo BufLen
ICBLH    .ds    1 ; Hi BufLen
ICAX1    .ds    1 ; Aux 1
ICAX2    .ds    1 ; Aux 2
ICAX3    .ds    1 ; Aux 3
ICAX4    .ds    1 ; Aux 4
ICAX5    .ds    1 ; Aux 5
ICAX6    .ds    1 ; Aux 6

; CIO Commands
OPEN      = 3

; Modificators
ODIR      = 6
DIRS      = 0 ; For DIRS
DIR       = 128 ; For DIR

; Setup CIO
        .or $2000

start   ldx #$40
        lda #$c ; CLOSE
        sta ICCOM,x ; IOCB4
        jsr CIOV
;
        ldx #$40 ; IOCB4
        lda #$01 ; Drive 1
        sta ICDNO,x
        lda #OPEN
        sta ICCOM,x
        lda #ODIR
        sta ICAX1,x
        lda #DIRS
        sta ICAX2,x
        lda #<FNAM
        sta ICBAL,x
        lda #>FNAM
        sta ICBAH,x
        jsr CIOV
;
        rts
;
FNAM    .by "D1:*.*",$9b

        .or $02e0
        .wo start

Attached Files



#33 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,906 posts
  • Location:Australia

Posted Sat Jan 21, 2017 6:57 PM

Not sure what the .ou directive does - looks like it sets the object filename.   With Mac-65 you specify the output filename in the ASM command if you want object written to an executable.

 

Mac-65 uses .ORG not .or to specify current assembly address.  Can also use *=

 

Other directives which need to change.

.by to .BYTE

.wo to .WORD

 

.ds looks to be the same.

Also, Mac-65 seems to handle lower-case just fine so you can probably get away without capitalization.



#34 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Sun Jan 22, 2017 12:16 AM

Hi, Rybags.

 

I have attached atr image with MAE Assembler.

and these dot-two_chars abbreviations are MAE syntax absolutely.

 

By the way I could not run this program even when using MAC/65.

 

It's Listing 9.1 from well known Assembly Language Programming for the Atari Computers.

But it's still not working.



#35 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Sun Jan 22, 2017 7:50 AM

Hi Again.

 

This problem solved.

 

I thought that it's full program but it's only part.

 

Here full working program...

; ls Command Demo
        .ou ls.com

; Atari Equates
RUNAD   = $02e0
CIOV    = $e456

; CIO Commands
COPEN   = 3        ; Open IOCB
GTREC   = 5        ; Get Txt Record
PTREC   = 9        ; Put Txt Record
CCLOS   = 12       ; Close IOCB

; Modificators
OPDIR   = 6
OSHOR   = 0
OLONG   = 128
IOCB0   = $00
IOCB1   = $10

; CIO Equates
IOCB    .or $0340
ICHID   .ds 1      ; Handler ID
ICDNO   .ds 1      ; Number
ICCOM   .ds 1      ; Command
ICSTA   .ds 1      ; Status
ICBAL   .ds 1      ; Lo BufAdr
ICBAH   .ds 1      ; Hi BufAdr
ICPTL   .ds 1      ; Lo PutAdr
ICPTH   .ds 1      ; Hi PutAdr
ICBLL   .ds 1      ; Lo BufLen
ICBLH   .ds 1      ; Hi BufLen
ICAX1   .ds 1      ; Aux 1
ICAX2   .ds 1      ; Aux 2
ICAX3   .ds 1      ; Aux 3
ICAX4   .ds 1      ; Aux 4
ICAX5   .ds 1      ; Aux 5
ICAX6   .ds 1      ; Aux 6

; Housekeeping
        .or $2000
dir
        jmp start

; 100 DIM BUFFER$(40) ; Save place for Buffer
buflen  = 40
buffer  .ds buflen

; 200 OPEN #1,6,0,"D:*.*"
fname   .by "D:*.*",0

start
        ldx #IOCB1
        lda #COPEN
        sta ICCOM,x
        lda #OPDIR
        sta ICAX1,x
        lda #OLONG
        sta ICAX2,x
        lda #<fname
        sta ICBAL,x
        lda #>fname
        sta ICBAH,x
        jsr CIOV

; 300 TRAP 700
        tya
        bmi L700

; 400 INPUT #1,BUFFER$
L400
        ldx #IOCB1
        lda #GTREC
        sta ICCOM,x
        lda #<buffer
        sta ICBAL,x
        sta ICBAL
        lda #>buffer
        sta ICBAH,x
        sta ICBAH
        lda #buflen
        sta ICBLL,x
        sta ICBLL
        jsr CIOV
;
        tya
        bmi L700

; 500 PRINT BUFFER$
        lda #PTREC
        sta ICCOM
        ldx #IOCB0
        jsr CIOV
;
        tya
        bmi L700

; 600 GOTO 400
        jmp L400

; 700 CLOSE #1
L700
        ldx #IOCB1
        lda #CCLOS
        sta ICCOM,x
        jsr CIOV
        rts

; File Sufficses
        .or RUNAD
        .wo dir

; END
        .en

Best wishes from Moscow!

ez



#36 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Sun Feb 19, 2017 8:38 AM

Hi, there, friends!

 

Recently I've found this Macro for MAC65:

2470 ;-----------------------------
2480 ; MACRO #2 "NEWPAGE"
2490 ; This macro will force the program counter to the
2500 ; next higher page number, even.
2510 ; EXAMPLE:
2520 ;  (program counter now $4322)
2530 ;      NEWPAGE
2540 ;  (program counter now $4400)
2550 ;
2560 ;Follow:          *=$4322
2570     .MACRO NEWPAGE 
2580     *=  *&$FF00 ; *=$4300
2590     *=  */$0100 ; *=$0043
2600     *=  *&$FF   ; *=$43
2610     *=  *+1     ; *=$44
2620     *=  **$0100 ; *=$4400
2630     .ENDM 
2640 ;Follow:          *=$4400
2650 ;

I think that it's manner is useful for redefining of charsets, PM etc.
Anyway it's very elegant :)

And the question...

Is it possible to rewrite it for MAE Assembler?

1. I know that *= is .or in MAE
2. I know that I can use labels and it's addressing
3. I know that redefining of labels is also possible
But I can not do this...

 

Maybe the reason is in my poor using of statements.

 

Please, help me.

 

The idea of macro Bump-Up of LOMEM or Bump-Down of HIMEM, aligning with given data is very interesting for me.

 

Best wishes from Moscow, Good Old Atariens!



#37 sanny OFFLINE  

sanny

    Moonsweeper

  • 339 posts
  • Location:Bavaria

Posted Tue Feb 21, 2017 6:55 AM

I'm using this Mac/65 macro to do alignments:

        .MACRO  ALIGN 
        *=      [*+%1-1]&[$FFFF-%1+1]
        .ENDM
 

Then you can use "ALIGN 256" to align to the next page. The parameter to ALIGN must be a power of two, otherwise the macro doesn't work.



#38 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Fri Feb 24, 2017 6:04 AM

Hi there, sanny!

 

Do you really think that some newbie loading it's Atari can run MADS, etc...

I think that newbies all - try to find their's Zen TO ATARI.

 

And I beleive that they all know Win or Lin environment. Even Mac environment, because of Intel/Posix Architecture!

And Atari is something like ANOTHER WORLD!

 

Due to the highest kindness of Drac030 I've met native MAE Assembler.

It's cool! But... I'm learning it too. Just now.

 

I've tryed say that using PC-based asms is the way of most experienced BOSSES but newbies.

 

Best Wishes from Moscow!

ez

 

YES!

Really I'm printing in Notepad++ but the process of printing is very much the same in Atari  as in Win.

I'm not pay any attention!

 

After printing I only call something from PC-Hard Drive and ASM it.



#39 sanny OFFLINE  

sanny

    Moonsweeper

  • 339 posts
  • Location:Bavaria

Posted Thu Mar 2, 2017 2:54 PM

Do you really think that some newbie loading it's Atari can run MADS, etc...

 

No. But I don't think I have said that :-)

 

I was talking about Mac/65, a native Atari assembler.



#40 fujidude ONLINE  

fujidude

    Quadrunner

  • 5,184 posts
  • Location:United States of America

Posted Thu Mar 2, 2017 4:04 PM

As far as native assemblers go, MAC/65 is very capable and feature rich.  Also, it's (as you enter) syntax checking is helpful, especially for budding programmers.  However, it's default source storage method is a tokenized format rather than text.  A newbie has to remember to list rather than save to have a text based source file, and similar considerations on source file input.  Another thing that I think is annoying is the use of line numbers.  I think they're more of a minus than a plus on balance.



#41 sanny OFFLINE  

sanny

    Moonsweeper

  • 339 posts
  • Location:Bavaria

Posted Thu Mar 2, 2017 5:21 PM

As far as native assemblers go, MAC/65 is very capable and feature rich.  Also, it's (as you enter) syntax checking is helpful, especially for budding programmers.

 

Yes, I think the syntax checking is very convenient for newbie programmers.

 

 

However, it's default source storage method is a tokenized format rather than text.  A newbie has to remember to list rather than save to have a text based source file, and similar considerations on source file input.

 

 

Agreed. But there are de-tokenizers available on the PC.

 

 

Another thing that I think is annoying is the use of line numbers.  I think they're more of a minus than a plus on balance.

 

What annoys me most is that the "RENUM" is so limited. One cannot say to renumber lines from "A to B" to "C using stepping D". I understand that that might (definitely will) give problems if there are already existing lines in the range [C, C+D*stepping]. But one could RENUM all remaining lines of the program somewhere "high" and then RENUM them back in chunks to locations which seem appropriate.



#42 fujidude ONLINE  

fujidude

    Quadrunner

  • 5,184 posts
  • Location:United States of America

Posted Thu Mar 2, 2017 7:48 PM

 

Yes, I think the syntax checking is very convenient for newbie programmers.

 

 

 

 

Agreed. But there are de-tokenizers available on the PC.

 

 

 

What annoys me most is that the "RENUM" is so limited. One cannot say to renumber lines from "A to B" to "C using stepping D". I understand that that might (definitely will) give problems if there are already existing lines in the range [C, C+D*stepping]. But one could RENUM all remaining lines of the program somewhere "high" and then RENUM them back in chunks to locations which seem appropriate.

 

"on the PC."  Well then you might as well bring in MADS etc,.  As to the renumbering of lines being limited... if you can freely edit text, cut & paste, etc., then you don't need no stinkin' lines to be able to put something in between what is already there in the 1st place.

 

Line number requirements blow chunks.



#43 576XE OFFLINE  

576XE

    Dragonstomper

  • 767 posts
  • Location:Moscow, Russia

Posted Sun Mar 19, 2017 1:36 AM

Hi, there, friends.

 

Here is elegant PL65 way of 1k font aligning.

! Dummy Array bumping up program counter for 1k-aligning
BYTE SPACE[$400-(@ AND $3FF)]

Here @ is Program counter.

 

Is it possible to make something like this while assembly?

My problem is that MAE has not operator precedence.

 

Please help.

 

Best wishes from Moscow.

ez



#44 kenjennings OFFLINE  

kenjennings

    Dragonstomper

  • 789 posts
  • Me + sio2pc-usb + 70 old floppies
  • Location:Florida, USA

Posted Sun Mar 19, 2017 1:49 PM

As far as native assemblers go, MAC/65 is very capable and feature rich.  Also, it's (as you enter) syntax checking is helpful, especially for budding programmers.  However, it's default source storage method is a tokenized format rather than text.  A newbie has to remember to list rather than save to have a text based source file, and similar considerations on source file input.  Another thing that I think is annoying is the use of line numbers.  I think they're more of a minus than a plus on balance.


Love Mac/65. Super for small things, even in an emulator.

But my tutorial projects have become larger and larger -- not necessarily the code, but the comments. Recently, I was doing something relatively minor and Mac/65 couldn't build it, because it ran out of memory -- used up by all the tutorial comments.

Since I'm mostly using linux I started using atasm -- all the joy of Mac/65 with none of the line numbers!

Edited by kenjennings, Sun Mar 19, 2017 1:51 PM.






Also tagged with one or more of these keywords: mads, atasm, 6502, assembler, beginner

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users