Max_Chatsworth Posted May 5, 2021 Share Posted May 5, 2021 I am set up with WUDSN and I have compiled /run a few sample programs with WUDSN configured for the MADS compiler. The difficulty I am having is that a lot of examples I find don't compile on MADS and I don't know enough yet, since I am just starting out learning ASM(reading "assembly_language_programming_for_the_atari_computers" PDF from learning links) and I don't know what is MADS specific or any other compiler specific or how to make sense of the best approach for learning it. Quote Link to comment Share on other sites More sharing options...
pps Posted May 5, 2021 Share Posted May 5, 2021 (edited) A very good start are the tutorials by @JAC!. All of them are for WUDSN and MADS and you learn how to code ATARI specific code on the fly. There are not just the code examples by him, but many video tutorials, too. Edited May 5, 2021 by pps 1 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted May 5, 2021 Share Posted May 5, 2021 Do you mean these? https://www.youtube.com/playlist?list=PLmzSn5Wy9uF8nTsZBtdk1yHzFI5JXoUJT 1 Quote Link to comment Share on other sites More sharing options...
+skr Posted May 6, 2021 Share Posted May 6, 2021 MADS is slightly different to other compilers (ATASM, XASM etc.), but mostly downwards compatible. If you have an "old" listing where you get errors, check, what the errors are saying and look up the specific MADS commands, that are different. One thing is, that in ATARI Assembler you set the memory with > *= $2000", while in MADS you have to use "ORG $2000". Comments in ATMAS start with > * <, while in MADS you use > ; < Before using MADS, check the manual: http://mads.atari8.info/mads_eng.html There you find the most important differences at the top: Quote small additions to ORG, e.g.. 'ORG [[expression]]adres[,adres2]' XASM does not like whitespace, MADS tolerates and accepts it in logical/arithmetic expressions and static/variable definitions MADS allows expressions to be grouped with (), [], XASM only within [] MADS provides static and variable definitions of local, global, and temporary scope, XASM only global MADS does not accept ORG a:adres or ORG f:adres MADS encodes real numbers using the directive .FL .FL real, XASM by pseudo-command DTA R DTA R(real) MADS has expanded support in the pseudo-command INS MADS does not accept the addressing form 'lda (203),0' MADS allows writing programs for SpartaDOS X MADS permits writing relocatable code in a custom format when encoding the value of a character, i.e. lda #' ' lda #" " MADS distinguishes between single quotes (ATASCII coding) and double quotes (INTERNAL coding), whereas XASM treats both forms the same (ATASCII coding). Of course, the quote types are treated the same in DTA by MADS. in indexed modes, a '+' or '-' sign increments or decrements the index register, e.g. lda $2000,x+ -> lda $2000,x inx but if the '+' or '-' sign is used with a value, it change the value of the main operand instead (this only works with absolute indexed addressing): lda $2000,x+2 -> lda $2002,x 1 Quote Link to comment Share on other sites More sharing options...
Max_Chatsworth Posted May 7, 2021 Author Share Posted May 7, 2021 On 5/5/2021 at 11:51 AM, pps said: A very good start are the tutorials by @JAC!. All of them are for WUDSN and MADS and you learn how to code ATARI specific code on the fly. There are not just the code examples by him, but many video tutorials, too. Thanks! I have been watching those and that got me up and running, but I look at lots of source code to other programs/other books and I'm really struggling to figure out what is MADS vs another compiler vs generic ASM, if such a thing exists. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted May 7, 2021 Share Posted May 7, 2021 Sounds like you're over thinking it and need to just dive in and code, when you're stuck then let the forum know and you'll get guidance. 1 Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 7, 2021 Share Posted May 7, 2021 5 hours ago, Max_Chatsworth said: Thanks! I have been watching those and that got me up and running, but I look at lots of source code to other programs/other books and I'm really struggling to figure out what is MADS vs another compiler vs generic ASM, if such a thing exists. Haha one of the things you might want to change paradigm for is that you are now doing assembly language, and so you should not be referring to the actions as compiling things, or the tools as compilers ? Quote Link to comment Share on other sites More sharing options...
Alfred Posted May 8, 2021 Share Posted May 8, 2021 Maybe trying to learn assembly language with a complex assembler like MADS isn’t a great idea. Maybe try starting out simpler with Asm/Ed or MAC/65 and once you know the language you can always go back to MADS. Quote Link to comment Share on other sites More sharing options...
Max_Chatsworth Posted May 8, 2021 Author Share Posted May 8, 2021 10 hours ago, Alfred said: Maybe trying to learn assembly language with a complex assembler like MADS isn’t a great idea. Maybe try starting out simpler with Asm/Ed or MAC/65 and once you know the language you can always go back to MADS. I was thinking about doing that very thing. It's hard sometimes when learning something new like this and I often wonder "is this the language or the tool?" . I have the feeling from my research that the plain old vanilla assembler for Atari back in the day was MAC/65. Does that exist as an assembler I can hook into WUDSN? I'm not gonna lie, being able to code on windows and immediately debug with Altirra is pretty sweet. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted May 8, 2021 Share Posted May 8, 2021 Disagree, MADS can act simple or be complex if you want it to be. What I haven't heard yet is what you are trying or have tried so far, what about that is not working against your expectation. Only then we can steer you in the right direction. 1 Quote Link to comment Share on other sites More sharing options...
atarilux Posted May 9, 2021 Share Posted May 9, 2021 I am no expert on assembler, as I only started looking at it myself recently. However, @Max_Chatsworth I found the interactive 6502 assembler tutorial below quite nice. It is platform neutral but helps to get started in the world of 6502. Easy 6502 by skilldrick Quote Link to comment Share on other sites More sharing options...
Max_Chatsworth Posted May 10, 2021 Author Share Posted May 10, 2021 On 5/9/2021 at 3:11 AM, atarilux said: I am no expert on assembler, as I only started looking at it myself recently. However, @Max_Chatsworth I found the interactive 6502 assembler tutorial below quite nice. It is platform neutral but helps to get started in the world of 6502. Easy 6502 by skilldrick Thanks! Quote Link to comment Share on other sites More sharing options...
Max_Chatsworth Posted May 10, 2021 Author Share Posted May 10, 2021 (edited) On 5/8/2021 at 9:58 AM, Wrathchild said: Disagree, MADS can act simple or be complex if you want it to be. What I haven't heard yet is what you are trying or have tried so far, what about that is not working against your expectation. Only then we can steer you in the right direction. @Wrathchild Sorry I can't give specifics. I guess in general I've tried to load a few existing examples and get all sorts of assembler errors as many of the sources I find are for another assembler, but I don't know enough to know what *might* need to be modifed. Edited May 10, 2021 by Max_Chatsworth Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted May 10, 2021 Share Posted May 10, 2021 post some screenshots Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted May 10, 2021 Share Posted May 10, 2021 Personally I would advise using MAC/65 to get started, it's pure 6502 without any of the more modern systems quirks, there are literally thousands of examples, loads of books, you can start with the easy stuff to get you going and move into the more intricate things later. When comfortable with that, then maybe you could move to the environment you want Quote Link to comment Share on other sites More sharing options...
Max_Chatsworth Posted May 11, 2021 Author Share Posted May 11, 2021 On 5/10/2021 at 5:33 AM, TGB1718 said: Personally I would advise using MAC/65 to get started, it's pure 6502 without any of the more modern systems quirks, there are literally thousands of examples, loads of books, you can start with the easy stuff to get you going and move into the more intricate things later. When comfortable with that, then maybe you could move to the environment you want is MAC/65 and assembler or an editor as well? Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted May 11, 2021 Share Posted May 11, 2021 3 minutes ago, Max_Chatsworth said: is MAC/65 and assembler or an editor as well? Yes, it is both 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted May 11, 2021 Share Posted May 11, 2021 Editor Just type ASM ASM on it's own will just assemble but not produce any code, if you want code, you would add a line 1 .OPT OBJ and it will assemble to memory to assemble to disk type ASM,,#D:<filename>.<ext> or Cassette ASM,,#C: if you want a listing, ASM,#P: There are loads of directive, those are just a few options, MAC/65 is also very good with macro's e.g. example MACRO 0100 .OPT NO MLIST 0110 .MACRO PDL 0120 LDX %1 0130 INC %1 0140 LDA %2,X 0150 STA WSYNC 0160 STA %3 0170 LDA %4,X 0180 STA %5 0190 LDA #%7 0200 STA %6 0210 PLA 0220 TAX 0230 PLA 0240 RTI 0250 .ENDM used like this:- 1230 P1 CMP #2 1240 BEQ P2 1250 PDL DLIINDEX+1,HP01,HPOSP1,PLAYCOLOR1,COLPM1,WHICHDL,$02 1260 P2 PDL DLIINDEX+2,HP02,HPOSP2,PLAYCOLOR2,COLPM2,WHICHDL,$FF 1 Quote Link to comment Share on other sites More sharing options...
Alfred Posted May 11, 2021 Share Posted May 11, 2021 On 5/8/2021 at 10:58 AM, Wrathchild said: Disagree, MADS can act simple or be complex if you want it to be. What I haven't heard yet is what you are trying or have tried so far, what about that is not working against your expectation. Only then we can steer you in the right direction. MADS has a much steeper learning curve than say MAC/65. Instead of spending time learning all the MADS features, and trying to learn the ones you actually need, it's simpler to use something like MAC/65 which is much easier to use, so the focus can be on learning assembly language and not on how to use MADS. DDT is also useful because you can immediately pop into memory and see your code in action. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted May 11, 2021 Share Posted May 11, 2021 The OP is using a PC based dev environment, i.e. cross-dev. Encouraging Max to go down the path of cutting his teeth on native development is daft, IMO, e.g. no need for line number these days. Altirra's debugging capabilities far surpasses that of DDT, learn those instead. Quote Link to comment Share on other sites More sharing options...
Alfred Posted May 11, 2021 Share Posted May 11, 2021 2 minutes ago, Wrathchild said: Altirra's debugging capabilities far surpasses that of DDT, learn those instead. Altirra's help file runs what, 10-20 pages ? Sure it has far more capabilities than DDT, far beyond what this guy needs. That doesn't make it easier to learn. I'm not suggesting that he clone BobTerm in MAC/65, but hands down, using MAC/65 on Altirra on a pc is going to let him learn assembly language at a more rapid pace than using MADS. It's a very simple environment, so he can focus on the code and not trying to remember the 25 options for setting a breakpoint in Altirra. No messing around transferring binaries to Altirra, it's just there. Once he knows the language, then sure, use WUDSN and read up on MADS. Sure, it's trivial for you; it's not trivial for him. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted May 11, 2021 Share Posted May 11, 2021 12 minutes ago, Alfred said: Altirra's help file runs what, 10-20 pages ? And the Mac/65 and DDT manual is 154, obviously reading is beneficial to most learning processes. 13 minutes ago, Alfred said: Sure it has far more capabilities than DDT, far beyond what this guy needs. That doesn't make it easier to learn Why not, plenty of guidance throughout the programming forum on what the minimum you can get by with. 15 minutes ago, Alfred said: and not trying to remember the 25 options for setting a breakpoint in Altirra Why the fearmongering, naturally just employing 'set break point at address' is just fine to begin with and equates to what you'd do in DDT. 25 minutes ago, Alfred said: Sure, it's trivial for you; it's not trivial for him. Not the point, like you I'm suggesting a path based upon my historic experiences of going through the process - in my case Atari ASM/ED first, then MAC/65, then cross-dev on an ST with MadMac, eventually using PC based cross-dev tools. These days I get by fine with Notepad++ and command line to run MADS (or easier still, a batch file with the MADS command in it). With Altirra, its going to load your label file and so you can use the label name instead when setting a breakpoint. 1 Quote Link to comment Share on other sites More sharing options...
Alfred Posted May 12, 2021 Share Posted May 12, 2021 1 hour ago, Wrathchild said: Why the fearmongering, naturally just employing 'set break point at address' is just fine to begin with and equates to what you'd do in DDT. umm, no, it's not just set a breakpoint. I seem to recall there's at least three different ones with like five options each. There's what .ba and a couple others. I always have to look it up because I rarely use Altirra's debugger. The debugger in Altirra is amazingly capable; it is not very user friendly, especially if you don't use it all the time. DDT is a far easier interface to -learn-. I really don't get this total hostility you cross-assembler/cross-dev guys have towards developing on the machine itself. If you can't stand using a 40 column editor or god forbid the line editor in MAC/65, then how can you stand playing games in 4 colours in 160x192 or whatever mode E is ? Compared to Eve Online, Star Raiders is pathetic. So it takes MAC/65 45 seconds to assemble your code instead of two seconds in MADS. Really, your life is so short, that 43 seconds makes a difference? Jesus, I remember when Bob and I were working on BobTerm, and with DMA off it took just over six minutes for BobTerm to assemble from hard disk. I looked at MADS a couple of times, and I didn't see that it did anything better than MAC/65 except it was faster, which is a non-issue for me. Sure MADS is a nice tool, but it has a greater learning curve than MAC/65 without a doubt. Like someone mentioned earlier, all the Atari books are written with either ASM/ED or maybe MAC/65 in mind, not MADS, so if he's trying out examples from the various books, he'll be looking at a lot more frustration and less learning trying to do that with MADS than with ASM/ED. Sure he'll get it eventually, but it'll be a lot more work. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted May 12, 2021 Share Posted May 12, 2021 30 minutes ago, Alfred said: The debugger in Altirra is amazingly capable; it is not very user friendly, especially if you don't use it all the time using the disassembly window you can type an address/label to go to that location, right click and set a breakpoint... pretty user friendly in my eyes. 21 minutes ago, Alfred said: I really don't get this total hostility you cross-assembler/cross-dev guys have towards developing on the machine itself. Because it isn't there. Myself and many of the coders I know are more than happy to experiment with things in, say, Turbo Basic and then the knowledge learnt fed back into our coding. People also choose to prototype stuff in Python, C# or C++ etc. 2 Quote Link to comment Share on other sites More sharing options...
pps Posted May 12, 2021 Share Posted May 12, 2021 On 5/5/2021 at 7:05 PM, DjayBee said: Do you mean these? https://www.youtube.com/playlist?list=PLmzSn5Wy9uF8nTsZBtdk1yHzFI5JXoUJT Yess, that's what I talked -ehm- wrote about Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.