Jump to content
Gury

Mad-Assembler (MADS)

Recommended Posts

I just tried to expand a STRUCT using the outline viewer, and it doesn't work

Verified, same for .enum. Will check tomorrow. Simply have not used .struct by now.

 

 

what can we expect? "texture", "sinus" etc?

All I can say is that has nothing to do with vectors and runs on 64k at full frame rate. The next will be a "traditional" demo which contains two things I started to code back in 1993 - now they have finally become possible. Seems I'm getting wiser with age;-) - well, and the tools get better, especially the assemblers.

Share this post


Link to post
Share on other sites

Peter... maybe you can help me... I have Gridrunner project on my iMac and I am sharing the folder with my Macbook. I can load the main asm file into Eclipse on the Macbook but can not compile it as it seems that the pathes are missing... or what is the mistake I am doing?

Share this post


Link to post
Share on other sites

I just need post again to send a very big public

 

Thanks TeBe for creating MADS

 

My contribution for the Sillyventure is now finished and sent.

 

Writing object file...
8965 lines of source assembled in 5 pass
39882 bytes written to the object file

 

This would not have been possible without MADS! It is the biggest demo I've every created in terms of code. And because of ".PROC" and ".LOCAL" the code looks so good, I'd like to print it and put it up the wall in frame. And with the ."IF/.ERROR" during compilation time, I even have automated boundary checks at compile time (DL crossing 1k boundary, branch crossing page boundary). I never imagined that would be possible. So just thanks again!

  • Like 1

Share this post


Link to post
Share on other sites

:) I second that, MADS rocks. Thanks to Tebe for all his hard work and support!

 

I'll look forward to seeing your demo Peter. If it tops your previous work it'll surely win :cool:

Edited by Tezz

Share this post


Link to post
Share on other sites

I'm learning MADS with a little project right now. I'm slowly grokking the docs, but it seems like the most powerful choice out there.

Share this post


Link to post
Share on other sites

Guys, you should try out the ca65 from the CC65-Suite :)

 

@peter:

congrats for finishing a demo for Silliventure. I didn't manage to do the planned intro :(

Can i have a peek-preview? :P

Edited by Creature XL
  • Like 1

Share this post


Link to post
Share on other sites

Hi TeBe, just found a bug in 1.9.4 which is not there in 1.9.3.

Forward references are sometimes counted as zero page addressing (1 bytes), though they need absolute addressing (2 bytes).

 

org $4000

 

.proc main

lda text_block

.endp

 

 

.local text_block

.endl

 

yields this corrupted file. End address should be $4002 instead. This is just the smallest example I could find. The other were more complex.

 

COM block 1

0000 : 0000 : FF FF 00 40 01 40

0006 : 4000 : AD 02

 

COM file structure error

0008 : 0000 : 40 | @

Edited by JAC!

Share this post


Link to post
Share on other sites

hi there,

 

is it possible to have full generated list after compilation? i'd like to see all 6502 codes and not a shortened list.

see an example below:

16 FFFF> 0600-0689> A9 00 +   mva #0 sdmctl
17                            copy #osrom,#osram,#0
17                           MWA #OSROM SOURCE\ MWA #OSRAM DEST\ MVA #0 COPY.ROUND\ JSR COPY
17 0605 85 CB A9 C0 85 CC    MWA #OSROM SOURCE
17 060B A9 00 85 CD A9 40 +  MWA #OSRAM DEST
17 0613 A9 00 8D 89 06       MVA #0 COPY.ROUND
17 0618 20 5E 06             JSR COPY

there is a plus "+" :-(

Share this post


Link to post
Share on other sites

MadAssembler source code, line = 789

 

margin = 32;
add 'x * 8'
x tab counter
8 size of TAB
default 'margin = 32'
   6 2001 A9 80 8D 00 A0 A9 +  mwa #$80 $a000
'margin = 32 + 8'
  6 2001 A9 80 8D 00 A0 A9 00 8D +    mwa #$80 $a000
'margin = 32 + 8 + 1'
   6 2001 A9 80 8D 00 A0 A9 00 8D 01 +  mwa #$80 $a000

Share this post


Link to post
Share on other sites

Hi tebe,

 

I am currently automating my build processes, so I can provide updates for different platforms more easily.

When I compile the mads.pas (2.0.6) with fp-compiler-3.0.0 on Ubuntu 16.04LTS I get the following warnings:

 

Compiling mads.pas
mads.pas(20,2) Note: APPTYPE is not supported by the target OS
mads.pas(1781,17) Hint: Variable "a" of a managed type does not seem to be initialized
mads.pas(2561,35) Hint: Variable "i" does not seem to be initialized
mads.pas(3213,3) Hint: Variable "a" of a managed type does not seem to be initialized
mads.pas(3539,21) Hint: Variable "war" of a managed type does not seem to be initialized
mads.pas(3632,29) Hint: Local variable "par" of a managed type does not seem to be initialized
mads.pas(3673,58) Hint: Parameter "old" not used
mads.pas(3962,24) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
mads.pas(3963,24) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
mads.pas(3964,24) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
mads.pas(3993,22) Hint: The left operand of the IN operator should be byte sized
mads.pas(4537,28) Warning: Local variable "tmp" of a managed type does not seem to be initialized
mads.pas(6103,10) Warning: Local variable "par" of a managed type does not seem to be initialized
mads.pas(8068,49) Warning: Local variable "str" of a managed type does not seem to be initialized
mads.pas(8669,46) Warning: Local variable "all" does not seem to be initialized
mads.pas(8822,16) Hint: Variable "k" does not seem to be initialized
mads.pas(9056,54) Warning: Local variable "txt" of a managed type does not seem to be initialized
mads.pas(9579,26) Hint: Local variable "par" of a managed type does not seem to be initialized
mads.pas(11054,33) Hint: Local variable "txt" of a managed type does not seem to be initialized
mads.pas(11054,9) Hint: Local variable "txt" of a managed type does not seem to be initialized
mads.pas(10057,27) Hint: Local variable "par" of a managed type does not seem to be initialized
mads.pas(12392,51) Hint: Local variable "tmp" of a managed type does not seem to be initialized
mads.pas(11497,51) Warning: Local variable "idx" does not seem to be initialized
mads.pas(11497,52) Warning: Local variable "idx" does not seem to be initialized
mads.pas(12392,53) Hint: Local variable "v" does not seem to be initialized
mads.pas(12512,54) Hint: Local variable "r" does not seem to be initialized
mads.pas(12871,29) Hint: Local variable "tmpZM" of a managed type does not seem to be initialized
mads.pas(13838,40) Warning: Local variable "vtmp" does not seem to be initialized
mads.pas(14967,21) Hint: Variable "nam" of a managed type does not seem to be initialized
mads.pas(15370,15) Warning: Variable "status" does not seem to be initialized
mads.pas(15367,15) Hint: Variable "plik_asm" of a managed type does not seem to be initialized
mads.pas(15348,5) Warning: Variable "binary_file" does not seem to be initialized

 

Best regards, Peter.

Share this post


Link to post
Share on other sites

Thanks tebe.

I found I had compiled with "-vh" and most of the hints are actually nonsense, like uninitialized input parameters of type string.
When I compile 2.0.7 with -vw I get only a few warnings. They really look like missing initialization so maybe they are worth while checking.

Which verbosity to you use when you compile?

Share this post


Link to post
Share on other sites

Ok, with standard "-v" I also get no warnings.

 

I have one request from this thread:

http://atariage.com/forums/topic/254826-mac-osx-how-to-use-altirrawine-and-eclipsewudsnmads-for-development/?do=findComment&comment=3881577

 

There is a problem, under Linux and OS X, that the "Source: <path>" line is missing in the .lst file. See here: Left windows, right Ubuntu.

post-17404-0-12581500-1509571118_thumb.png

Share this post


Link to post
Share on other sites

Perfect! Works 100% under Linux and looking at the fix I'm sure it'll work under Mac OS X, too. Will try that once my Mac setup is up and running. Thanks, tebe!

 

post-17404-0-45068300-1509748373_thumb.png

Share this post


Link to post
Share on other sites

Hi tebe, a minor nit. I noticed that .BYTE doesn't implement additive modifiers like in MAC/65.

     1         ORG $600
     2 FFFF> 0600-0607> EA     NOP
     3 0601 C1 C2 C3      .BY +$80,'ABC'
     4 0604 80 41 42 43      .BYTE +$80,'ABC'

Fortunately .BY does, but perhaps .BYTE and .SBYTE should pick up this feature as well.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

There are corresponding versions for the screen/string version.

 

.SB [+byte] bytes and/or ASCII

.CB [+byte] bytes and/or ASCII

Share this post


Link to post
Share on other sites

There's a way to specify "org" on the mads command line. Is there a way to do that with with "opt"? Sometimes would be handy to assemble data without Atari headers.

Share this post


Link to post
Share on other sites

There's a way to specify "org" on the mads command line. Is there a way to do that with with "opt"? Sometimes would be handy to assemble data without Atari headers.

 

OPT h- ;No header

ORG ORIGIN

 

mads.exe -d:ORIGIN=$2000

  • Like 1

Share this post


Link to post
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...