Jump to content
IGNORED

Mad-Assembler (MADS)


Gury

Recommended Posts

it seems there is a missing entry in config file for 64bit platform

Quote

/etc/fpc.cfg

 

add entry in the correct line

 

Quote

#ifdef cpux86_64
-Fl/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin18.2.0
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/
#endif

 

  • Like 1
Link to comment
Share on other sites

  • 10 months later...
1 hour ago, ascrnet said:

Hi all,

 

I am passing a program from MAC65 to MADS, but I did not understand what the equivalent of the following lines is :


BASE = $5000

; MAC65
SETVEC = *-BASE
BUFFLEN = *+1
ERRNUM * = *+24

 * = *+49
  .SB +$80," START "

regards

 

I would try with something like:

 

BASE = $5000

SETVEC = *-BASE

BUFFLEN = *+1

ERRNUM

   org *+24

   org *+49

   .sb +128, " START "

 

(untested!)

 

  • Thanks 1
Link to comment
Share on other sites

This is missing the initial assigment to the orgin.

Something like

 

* =$8000 in MAC which is ORG $8000 in MADS.

 

SETVEC = *-BASE ;OK

BUFFLEN = *+1 ;OK

ERRNUM .ds 24

 

 .ds 49

  .SB +$80," START " ;Not sure, please check the MADS docs , probably something lke .byte +$80 ' START '

 

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, NRV said:

 

I would try with something like:

 

BASE = $5000

SETVEC = *-BASE

BUFFLEN = *+1

ERRNUM

   org *+24

   org *+49

   .sb +128, " START "

 

(untested!)

 

Thanks for the help.

1 hour ago, JAC! said:

This is missing the initial assigment to the orgin.

Something like

 

* =$8000 in MAC which is ORG $8000 in MADS.

 

SETVEC = *-BASE ;OK

BUFFLEN = *+1 ;OK

ERRNUM .ds 24

 

 .ds 49

  .SB +$80," START " ;Not sure, please check the MADS docs , probably something lke .byte +$80 ' START '

 

Thanks for the indications I will try them, I just put the lines that I had doubts about how they were.

 

The program is MICRODOS XL always caught my attention as they did. I already assembled it but it has some strange behaviors.?

   

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...
  • 1 month later...
  • 3 months later...

hello,

one issue I came across...

I got used to anonymous labels lately... but found unwanted behavior when used in macros.

When anonymous label is used within macro, then the label is counted however not accessible (because all macro labels are local).

I would expect the anon.label in macro should not be counted from outside.

 

Example:

image.png.b450c765fdc29a00e6a81133f80f7ef7.png

 

this one works ok (but one needs to know that test macro contains anon.label @, so +1 has to be added) => I think this is bug:

image.png.6167fa93bb1b5ce0aff317d5a10eebb0.png

 

...maybe it is not very cool to use anon.labels in macros... what it your opinion?

Link to comment
Share on other sites

  • 2 weeks later...

Having some problems with MADS on Linux.

 

i'm getting an error from MADS when trying to assemble the 1nvader game.

Compiler 'MADS' output:
Runtime error 216 at $0000000000417845
  $0000000000417845

 

This happens from command line or from eclipse/WUDSN.

 

i thought maybe the mads which I had downloaded long ago was out of sync with current  linux libraries, so did some updates, got the current source, built a new executable without issues (remarkably), and still get the same error.   (At least I have a nice shiny 2.1.3 now).

 

Then I tried the last large game I wrote (Pet Frogger V03) and it assembled just fine from eclipse/WUDSN

 

So, it seems that there's something about the 1nvader source code that's breaking mads.   ANY IDEAS?   What I get out of google is that this is a memory access error.   

 

Most recently, I had been adding some strings for options menus, and commenting out declarations of unused variable.   Is there any limit in Mads that I may be hitting --  like file size limit or total number of source lines?

 

 

Link to comment
Share on other sites

8 hours ago, tebe said:

try yesterday's version, https://github.com/tebe6502/Mad-Assembler

Nope.

 

2.1.3:

Runtime error 216 at $0000000000417845
  $0000000000417845

 

2.1.4 just downloaded and rebuilt.

Runtime error 216 at $0000000000417965
  $0000000000417965

 

 

I made a bunch  of new declarations in  https://github.com/kenjennings/Atari-1nvader/blob/master/ata_1nv_gfx.asm

A lot of it was similarly named labels for a list of options/menus and I'm wondering if its the similarity or the lengths of similar names that is breaking this.

I'll try later commenting out the newer stuff and then try a reassemble, then put back the declarations in stages and see where this finally breaks.

 

Link to comment
Share on other sites

13 minutes ago, tebe said:

yes, commas

 

debug FPC:


fpc -Mdelphi -g mads.pas

gdb mads.exe

run filename.asm -i:path

 

 

Ooo.  Yeah.   Those commas shouldn't be there.  That's not right.   (shouldn't it be a syntax error?)

 

 

Yup.  That's what did it.  Assembly completes now.    THANKS!!!

Edited by kenjennings
update. it builds now.
Link to comment
Share on other sites

Think I've found a little bug in the listing produced by MADS.

I've been moving some MAC/65 projects into MADS as an exercise getting used to it as an assembler and

noticed this in the listing file in bold, it doesn't put the full JSR address ?.

 

    12                          org  $A000
    13 FFFF> A000-A7DA> 20 B0 +          JSR CLEAR   ;CLEAR PIC AREA
    14 A003 20 16 A3                 JSR AGAIN1  ;GET IST SET OF PICTURES
    15 A006 A0 FC                 LDY #$FC
    16 A008 B9 01 06        XX1      LDA $0601,Y

 

So I created a small test file to see if it did it with a JSR as the first statement and it does:-

                    org $600
     2 FFFF> 0600-060B> 20 2F +         jsr program
     3 0603 20 30 06                jsr program1
     4 0606 85 CB                sta $cb
     5 0608 4C 2A 06                jmp next
     6 060B 00                    .byte 0
     7 060C                    org *+30
     8 062A-0630> A9 02        next lda #2
     9 062C 85 CC                sta $cc
    10 062E 60                    rts
    11 062F 60            program rts
    12 0630 60            program1 rts

 

and same with JMP

 

 D:\WUDSN-IDE\Projects\TestStuff\test1.asm
     1                     org $600
     2 FFFF> 0600-060B> 4C 2F +         jmp program
     3 0603 20 30 06                jsr program1
     4 0606 85 CB                sta $cb
     5 0608 4C 2A 06                jmp next
     6 060B 00                    .byte 0

 

Link to comment
Share on other sites

1 hour ago, TGB1718 said:

Think I've found a little bug in the listing produced by MADS.

I've been moving some MAC/65 projects into MADS as an exercise getting used to it as an assembler and

noticed this in the listing file in bold, it doesn't put the full JSR address ?.

 

    12                          org  $A000
    13 FFFF> A000-A7DA> 20 B0 +          JSR CLEAR   ;CLEAR PIC AREA
    14 A003 20 16 A3                 JSR AGAIN1  ;GET IST SET OF PICTURES
    15 A006 A0 FC                 LDY #$FC
    16 A008 B9 01 06        XX1      LDA $0601,Y

 

So I created a small test file to see if it did it with a JSR as the first statement and it does:-

                    org $600
     2 FFFF> 0600-060B> 20 2F +         jsr program
     3 0603 20 30 06                jsr program1
     4 0606 85 CB                sta $cb
     5 0608 4C 2A 06                jmp next
     6 060B 00                    .byte 0
     7 060C                    org *+30
     8 062A-0630> A9 02        next lda #2
     9 062C 85 CC                sta $cc
    10 062E 60                    rts
    11 062F 60            program rts
    12 0630 60            program1 rts

 

and same with JMP

 

 D:\WUDSN-IDE\Projects\TestStuff\test1.asm
     1                     org $600
     2 FFFF> 0600-060B> 4C 2F +         jmp program
     3 0603 20 30 06                jsr program1
     4 0606 85 CB                sta $cb
     5 0608 4C 2A 06                jmp next
     6 060B 00                    .byte 0

 

this is a margin constraint

 

mads.pas (line = 288, 'margin    : byte = 32;')

Link to comment
Share on other sites

hi @tebe,

I would like to put screen data before the font data that is aligned to $400. is it possible to do it dynamically without using the SCR file size constant?

 

something like this:

org $2000-lengthOfFile("my.scr")
ins my.scr
ins my.fnt

I tried to load my.scr using .get, however combination .len .get is not allowed.

Honestly I have not used .get ever before, how can I check the length of the .get array?

Edited by matosimi
Link to comment
Share on other sites

one more issue, I'm not sure if it is MADS issue of G2F code generator issue (since I am not used to work with enums).

Usually if I have to include (one or more) G2F(s) to my SW I put it into .local (maybe there is more elegant way I do not know about) like this:

.local	title_g2f
	icl "title_new\logo\logo_adjusted.asm"
.endl

logo.asm is the source generated by G2F asm output, I simply make a copy with _adjusted to not overwrite my adjustment by another asm export, I remove the init part and simply call

jsr title_g2f.main

...in the latest version of g2f I'm getting following error:

mva #@dmactl(standard|dma|lineX1|players|missiles) dmactl	;set new screen width
logo_adjusted.asm (329) ERROR: Undeclared label STANDARD (BANK=0)

the issue is in the NMI procedure... which I can fix quickly by changing faulty line with:

mva #scr40 dmactl

 

Of course if I simply compile the logo.asm (without adjustments) it compiles/runs ok. 

It just somehow gets broken when it is within the .local .

 

Am I doing something wrong? 

Edited by matosimi
typo
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...