Jim Patchell Posted April 30, 2010 Share Posted April 30, 2010 Hello All... I am working on a project of trying to recreate the ACTION! compiler as a cross compiler that runs on the PC under windows. However, at the moment, all of my stuff, or most of it, is in storage, including my Atari 800. So, at the moment, I have no way of generating real examples from the ACTION! cartridge. So, I was wondering if some kind soul would compile some examples for me from a ACTION! cartridge and send them to me. ;example1.act MODULE CARD a,b,c PROC main() IF a < b THEN c = 0 ELSEIF a = b THEN C = 1 ELSEIF a > b THEN C = 2 FI DO OD RETURN ;example2.act MODULE INT a,b,c PROC main() IF a < b THEN c = 0 ELSEIF a = b THEN C = 1 ELSEIF a > b THEN C = 2 FI DO OD RETURN Well, this should get me started on trying to clean up relational operators. Thanks in advance for help. Here is the BLOG of the work I have been doing the past couple of months. http://www.noniandjim.com/Jim/atari/Action_Compiler.html This is a very premature posting. I was trying to wait until I finished, but, since I can use some help...well, what could I do. -Jim You can either post the object files here, or send them directly to me at: patchell at cox.net Quote Link to comment Share on other sites More sharing options...
+MrFish Posted April 30, 2010 Share Posted April 30, 2010 Why not use an emulator? Quote Link to comment Share on other sites More sharing options...
Jim Patchell Posted April 30, 2010 Author Share Posted April 30, 2010 Why not use an emulator? Well, I could, I suppose. (In fact, that would be ideal). Is it posible to get an emulator that will run a virtual Action! cartridge? -Jim Quote Link to comment Share on other sites More sharing options...
+MrFish Posted April 30, 2010 Share Posted April 30, 2010 Why not use an emulator? Well, I could, I suppose. (In fact, that would be ideal). Is it posible to get an emulator that will run a virtual Action! cartridge? Definitely. Here's a very good one: Atari800Win PLus The cartridge can be found here: Atarionline - Programming Quote Link to comment Share on other sites More sharing options...
Shawn Jefferson Posted April 30, 2010 Share Posted April 30, 2010 There is a project that aims to compile ACTION programs on the PC... http://gury.atari8.info/effectus/ Quote Link to comment Share on other sites More sharing options...
Jim Patchell Posted April 30, 2010 Author Share Posted April 30, 2010 There is a project that aims to compile ACTION programs on the PC... http://gury.atari8.info/effectus/ Thank you for the tip. A very interesting project. I took a look at that before I started my project...but I have my own reasons for doing this project. I lost my eyesight back in September, and I was looking for a project that would be fun and would help me to retrain myself at doing my job (embedded system programming and FPGA design.). So I decided write a compiler and verilog core for the 6502. So, since the ACTION! compiler was a good language for the 6502, that is what I decided on. So, the main point of this project is to do a lot of work. And who knows, when I am done, I might even write a real nice tool. Quote Link to comment Share on other sites More sharing options...
joyfulcoder Posted April 30, 2010 Share Posted April 30, 2010 Hello Jim, I have attached a Zip file containing two .ACT files and two .BIN files for your two examples. Thanks, Eric Hello All... I am working on a project of trying to recreate the ACTION! compiler as a cross compiler that runs on the PC under windows. However, at the moment, all of my stuff, or most of it, is in storage, including my Atari 800. So, at the moment, I have no way of generating real examples from the ACTION! cartridge. So, I was wondering if some kind soul would compile some examples for me from a ACTION! cartridge and send them to me. ;example1.act MODULE CARD a,b,c PROC main() IF a < b THEN c = 0 ELSEIF a = b THEN C = 1 ELSEIF a > b THEN C = 2 FI DO OD RETURN ;example2.act MODULE INT a,b,c PROC main() IF a < b THEN c = 0 ELSEIF a = b THEN C = 1 ELSEIF a > b THEN C = 2 FI DO OD RETURN Well, this should get me started on trying to clean up relational operators. Thanks in advance for help. Here is the BLOG of the work I have been doing the past couple of months. http://www.noniandjim.com/Jim/atari/Action_Compiler.html This is a very premature posting. I was trying to wait until I finished, but, since I can use some help...well, what could I do. -Jim You can either post the object files here, or send them directly to me at: patchell at cox.net examples.zip Quote Link to comment Share on other sites More sharing options...
Jim Patchell Posted May 1, 2010 Author Share Posted May 1, 2010 Hello Eric... Thank you for those files. I was able to confirm one hunch, and solve one mystery. I believe the name of the gent who wrote action! was clinton parker...well, who ever he was, he was sure one bright guy. Now, if I can just figure out a way to use the Atari Emulator, I won't need to ask for help. (my screen reader interfers with the emulator program... <sigh>) Hello Jim, I have attached a Zip file containing two .ACT files and two .BIN files for your two examples. Thanks, Eric Quote Link to comment Share on other sites More sharing options...
DanBoris Posted May 2, 2010 Share Posted May 2, 2010 You might be interested in checking out my blog http://www.atariage.com/forums/index.php?app=blog&module=display§ion=blog&blogid=52&. I have done a bunch of posting that analyzes the machine code generated by various blocks of Action! code. Quote Link to comment Share on other sites More sharing options...
Jim Patchell Posted May 3, 2010 Author Share Posted May 3, 2010 Thank you...I will take a look at that... You might be interested in checking out my blog http://www.atariage.com/forums/index.php?app=blog&module=display§ion=blog&blogid=52&. I have done a bunch of posting that analyzes the machine code generated by various blocks of Action! code. Quote Link to comment Share on other sites More sharing options...
Jim Patchell Posted May 3, 2010 Author Share Posted May 3, 2010 I really do want to thank the person who turned me onto the emulator. Even though I am still having some trouble using it because it is incompatable with ZoomText, I have found ways of at least limping along. I really like the monitor feature the program has. I have been using that to look at code samples I compile. Next thing I need to do is get a "boot disk". I used to run MyDos back when I used my Atari 800. By the way, the source code for the Duplicator 1050 is on my website. It was writen for the Atari Macro Assembler. -Jim Quote Link to comment Share on other sites More sharing options...
+MrFish Posted May 4, 2010 Share Posted May 4, 2010 (edited) I really do want to thank the person who turned me onto the emulator. Even though I am still having some trouble using it because it is incompatable with ZoomText, I have found ways of at least limping along. I really like the monitor feature the program has. I have been using that to look at code samples I compile. Next thing I need to do is get a "boot disk". I used to run MyDos back when I used my Atari 800. Here's a page that has info and downloads for MyDOS: Mathy's MyDOS Edited May 4, 2010 by MrFish Quote Link to comment Share on other sites More sharing options...
Jim Patchell Posted May 7, 2010 Author Share Posted May 7, 2010 Just thought I would share this. What is going to follow is the output from my compiler. It is far from complete...but seeing things like this make me happy. What you will see is a stupid little short proceedure, followed by the syntax tree, followed by the generated code. ACTION! Ver 0.04 cross compiler for the 6502 Copyright (c) 2010 by Jim Patchell This program is free for any use Get Input From Consol module proc aproc(card a,b) card c if a < b then c = 1 elseif a = b then c = 2 else c = 3 fi return NUMB DOWN NEXT ; 22 21 -1 +-PROC aproc ; 21 -1 19 +-PROCLOCALS c ; 19 7 20 +-IFSTMT ; 7 3 14 | +-IF ; 3 1 6 | | +-LT ; 1 -1 2 | | | +-IDENT a ; 2 -1 -1 | | | +-IDENT b ; 6 4 -1 | | +-EQUALS ; 4 -1 5 | | +-IDENT c ; 5 -1 -1 | | +-CONSTANT 1 ; 14 10 18 | +-ELSEIF ; 10 8 13 | | +-EQ ; 8 -1 9 | | | +-IDENT a ; 9 -1 -1 | | | +-IDENT b ; 13 11 -1 | | +-EQUALS ; 11 -1 12 | | +-IDENT c ; 12 -1 -1 | | +-CONSTANT 2 ; 18 17 -1 | +-ELSE ; 17 15 -1 | +-EQUALS ; 15 -1 16 | +-IDENT c ; 16 -1 -1 | +-CONSTANT 3 ; 20 -1 -1 +-RETURN ^Z Processing Nodes 22:PROC .SECTION "temps",$80 __TEMP_var0: .DS 16 .SECTION "args",$a0 __ARGS: .DS 16 .SECTION "code",$2000 aproc_ARG__a: .DS 2 aproc_ARG__b: .DS 2 aproc: STA aproc_ARG__a STX aproc_ARG__a+1 STY aproc_ARG__a+2 LDA $A0+3 STA aproc_ARG__a+3 JMP aproc_Lab0 aproc_c: .DS 2 aproc_Lab0: ;If Statement LDA aproc_ARG__a+0 CMP aproc_ARG__b+0 LDA aproc_ARG__a+1 SBC aproc_ARG__b+1 BCC aproc_true__Lab3 JMP aproc_false__Lab2 aproc_true__Lab3: LDA #1 STA aproc_c+0 LDA #0 STA aproc_c+1 JMP aproc_exit__Lab1 aproc_false__Lab2: ;If Statement LDA aproc_ARG__a+0 EOR aproc_ARG__b+0 BNE aproc_false__Lab4 ORA aproc_ARG__a+1 EOR aproc_ARG__b+1 BEQ aproc_true__Lab5 JMP aproc_false__Lab4 aproc_true__Lab5: LDA #2 STA aproc_c+0 LDA #0 STA aproc_c+1 JMP aproc_exit__Lab1 aproc_false__Lab4: LDA #3 STA aproc_c+0 LDA #0 STA aproc_c+1 aproc_exit__Lab1: RTS Attributes in type field are: upel unsigned (. for signed)-----+||| private (. for public)------+|| extern (. for common)-------+| long (. for short )--------+ name rname lev next type a 0 int FIX (NO OCLS) u... aproc 0 void FIX (NO OCLS) ....() Arguments of aproc a 0 int FIX (NO OCLS) u... b 0 int FIX (NO OCLS) u... End of Arguments of aproc b 0 int FIX (NO OCLS) u... c 0 int FIX (NO OCLS) u... Structure table: D:\Projects\Action> Sure am having fun with some of the new emulator tools I have been shown! -Jim Quote Link to comment Share on other sites More sharing options...
+MrFish Posted May 8, 2010 Share Posted May 8, 2010 (edited) There is also another very popular (and currently under development) emulator that you may want to look at, available here: Altirra It may be more compatible with your reader program. Unfortunately it will not run the Action cartridge, yet. However there is a disk version, which will run on Altirra, available on the same site as the cart. Edited May 8, 2010 by MrFish Quote Link to comment Share on other sites More sharing options...
Jim Patchell Posted May 9, 2010 Author Share Posted May 9, 2010 There is also another very popular (and currently under development) emulator that you may want to look at, available here: Altirra It may be more compatible with your reader program. Unfortunately it will not run the Action cartridge, yet. However there is a disk version, which will run on Altirra, available on the same site as the cart. Thanks I will take a look at that one...:-) 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.