Jump to content
IGNORED

Effectus - Action! cross-compiler using Mad-Assembler (MADS)


Gury

Recommended Posts

Of course, I can do that, but this is not de facto list, because there is so much going on with Action!

 

My site providing old version of Effectus has a list of supported and unsupported routines here. Most of it is supported also in new version, except the following:

 

- PROCs: XIO, Note, Point

- Directives and special PROCs: MODULE, INCLUDE, SET, Error

 

There are lot of missing features in syntax, but they will be solved step by step. We have to distinguish between already known errors and those not yet discovered. Action! has very interesting syntax and the ways of doing things. It is a derivate between C and Pascal code style with some similarities with Clipper. It is typed language, but with more freedom than C or Pascal. It is nearly like JavaScript vs C# or Java. It allows you more freedom in coding, but more errors can arise.

 

It is not definite list of errors yet, but it is a start:

- TYPE and BYTE/CARD ARRAY structure has some rules to follow to be compiled correctly

- BYTE/CARD ARRAY declaration with predefined values makes some problems depending on how it is declared

- FUNCtions with machine language code

- Declared strings have to be of non-standard type I temporarily called SBYTE ARRAY because of the way Action! handles bytes. Effectus will have to immitate it like Action! does, byte by byte, which are concatenated together to form a string.

- PROC/FUNC parameter types: BYTE ARRAY, CARD ARRAY, POINTER

- pointers are not yet fully supported

 

That's it for now!

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

New version 0.4.2

New features

  • 2-pass parsing process (DEFINE constants are parsed in 2nd pass, so all DEFINE constants should be substituted with appropriate values through the listing code)

Bug fixes

  • Correct parsing of character "-" in Effectus source code listing files (bug found by zbyti)
    (illegal character removed from program statement in Mad Pascal, f.e. zp-sieve is translated to program zpsievePrg;)
  • Removed unnecessary FOR initial variable assignment before main FOR loop declaration
  • Joystick unit overrided Graph unit, so graphics usage was not detected. The fix enables Graph and Joystick units to be interchangeable and neither unit is removed from unit clause
  • begin word added after declaring BYTE ARRAY variable, which didn't appear in some cases
  • Action! RETURN statement in IF condition allowed, so it is possible to exit routine immediately without branching to ending RETURN statement. It is substituted with Exit statement in Mad Pascal
    Example: IF KBCODE=135 THEN RIGHT RETURN FI
  • Assignment of BYTE ARRAY varible to memory address variable is allowed,
    f.e. Action! SCREEN=SAVMSC is translated to SCREEN := pointer(word(@SAVMSC)); in Mad Pascal

Misc

  • Compiled 64-bit versions of Mad Assembler and Mad Pascal included in Effectus 64-bit version package

It's time to hunt down remaining annoying bugs...

 

Effectus reference

 

  • Like 3
Link to comment
Share on other sites

New version 0.4.3

New features

  • Missing PROCedures added: PutD, PutDE
  • Variables allowed in inline machine language block
    PROC dli() ; display list interrupt routine
       [
       $AE INDEX  ; LDX INDEX
       $BD $FFFF  ; LDA STRCOL,X
       $8D WSYNC  ; STA WSYNC
       $8D COLPF0 ; STA COLPF0
       $EE INDEX  ; INC INDEX
       $40        ; RTI
       ]
    RETURN
    
  • Assigning memory address to fixed BYTE ARRAY variable declaration
    (f.e. PCOLR(1) = $2C0)

Bug fixes

  • DEFINE constants are case insensitive now
  • Correct parsing of new line called by statement PRINTE() or PRINTE("")
  • Removed unnecessary UNTIL initial variable assignment before main DO UNTIL DO loop declaration
  • More statement spacing freedom
  • Proper integer division (div operator) handling ('/' operator substituted with div operator, as there is no float/real division functionality in Action! anyway)
  • Proper assignment of second parameter in Action! MoveBlock procedure as pointer assignment to a first parameter in Mad Pascal Move procedure in case it is a number
    Example:
      Action! statement:    MOVEBLOCK(TOPMEM,57344,1023)
      Mad Pascal statement: Move(pointer(57344), pointer(TOPMEM), 1023);
    
  • Closing end statement added in Mad Pascal code for some cases where Action! RETURN statement does not appear, f.e. after closing ']' in inline assembly

Misc

  • New examples
  • New document listing of missing features and bug issues (dev_log.txt)

 

eff02.png eff01.png

 

eff03.png eff04.png

 

man_anim.xex rainbow.xex chrdef.xex dlidemo.xex

Edited by Gury
  • Like 5
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

Do you mean lib directory? It is a part of Effectus package as is base directory for using with Mad Assembler. I don't plan to make use of any extra directories, because features of Effectus highly depend on routines from Mad Pascal.

For example, CIO unit, available in Mad Pascal 1.6.4 includes support for I/O routines, direct writing to channel 6 and XIO routine, which will be included in new version of Effectus (as are all unit libraries from Mad Pascal package).

 

Link to comment
Share on other sites

Ah ok, I understand now. This would be possible with some kind of interface layer for Mad Pascal routines from custom non-standard units, such as rmt.pas library. This is more complicated as it seems, but probably possible. We would need some kind of generic calls to automatically create Effectus code from such libraries. It would be necessary to implement directive statements or maybe parameter calls from command prompt.

 

This is a feature for future consideration, other elementary things must be finished first.

 

Edited by Gury
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

New version (0.5) can be downloaded here.
 

New:
  - Better handling of pointers including ARRAY variables (introducing Mad Pascal new byte pointer type PByte)
  - Enhanced handling of device and I/O operations (introducing Mad Pascal CIO unit with true handling of Open and Close routines, reading/writing BYTE and string values, so Mad Pascal BlockRead and BlockWrite routines are not needed anymore):
    - smaller and faster code
    - added support for XIO procedure
    - Open routine: (using Mad Pascal Opn routine instead of Assign/Reset combination without the need for special file variable handler (f.e. f : file;))
    - Close routine: (using Mad Pascal Cls routine instead of Close(f); statement)
    - direct writing of characters to device with PutD and PutDE routines (using Mad Pascal Put instead of BlockWrite routine)
    - direct writing of strings and numbers to device with PrintD, PrintDE, PrintBD, PrintBDE, PrintCD, PrintCDE, PrintID and PrintIDE routines (using Mad Pascal BPut instead of BlockWrite routine)
    - reading strings from device with InputSD and InputMD routine (using Mad Pascal BGet instead of BlockRead routine)
    - reading numbers from device with InputBD, InputCD and InputID routines (using Mad Pascal Get instead of BlockRead routine)

    - GetD(7) true handling
  - IF condition block: comparing values with FUNCtions Rand, Peek, PeekC and SCompare can be used
  - Assignment of BYTE ARRAY variable with index element as a FUNCtion is possible
    (f.e. dir = new_dir(Rand(8))). This feature is currently possible only for Rand, Peek, PeekC, ValB, ValC and ValI functions.
  - Smaller and faster compiled executable code (Mad Pascal SySutils used when necessary, CIO unit with new I/O functions enables Effectus to use specialized routines for device and I/O operations, Mad Pascal temporary variable intValue removed)
  - CHAR data type as a substitute for BYTE data type
  - Shell:
    - new options (-z, -zb, -zw, -zp) added for declaring variables in zero page block as absolute address variables starting at $e0 address (BYTE, CARD (word) and PBYTE data types supported)
    - some text and reference link changes
  - Mad Pascal Compiler version 1.6.4 [2020/06/20] included with the package
  - Mad Assembler 2.1.0 build 8 (23 Dec 19) included with the package

  - New examples added (chessboard.pas and rscroll.pas from zbyti's test suit package)

 

Buf fixed:
  - n=Peek(COL) is actually LMS of absolute address variable COL, not a value content (correct syntax for that case would be n=COL, or n=Peek(710))
  - Removed assignment of compare statement prior to actual WHILE branch condition statement (bug found by zbyti)

 

New parameters (-z, -zb, -zw, -zp) can be used to assign variables in zero page space. if -z parameter is used, all supported data variable types will be operated on starting from $e0 memory address.

 

Typing effectus examples\chessboard -z on Effectus root directory will produce chessboard executable with 73 iterations. Note that speed gain with -z option will not be produced for every possible program, it could lead to slow downs also.

 

With new excellent CIO unit the manipulation of device and I/O operations is faster and easier. Thanks, Tebe.

An example putd shows a speed gain writing characters in text mode 1 screen.

 

chessboard.png.d7fd331484aca5f6d3c4c0319dab4f1f.png rscroll.png.d0f400890618fa83fb7f16b53423142f.png putd.png.98605aaae1008a8fa214b0bbef009dd4.png

 

chessboard.xex rscroll.xex putd.xex

Edited by Gury
  • Like 3
Link to comment
Share on other sites

Thank you! Fine to have MacOS version.

Now I will create some issue notes for easier handling of missing features. Anybody here can do the same for any missing feature he/she thinks would be good to be implemented in later releases.

 

  • Like 1
Link to comment
Share on other sites

@Gury & @tebe

 

I wonder it's there any restrictions about zero page in Mad Pascal, I'm free to use memory only from $e0 not from $80?

 

I'm going to program with Effectus/Mad Pascal with system off - it's there any restrictions with using page zero related to the Mad Pascal compiler?

Edited by zbyti
Link to comment
Share on other sites

I think it is a question for Tebe, I hope he will answer. But I can change the way Effectus configures this address, so it could be set by console parameter. What do you think?

Or by using SET directive, when it will be supported.

Link to comment
Share on other sites

I think the MP compiler itself does not have to use the zero page but the optimization flag -o can? Or some speed-oriented libraries?

 

As far as I know only SET $E makes sense to implement, rest it's really POKE to Action! variables.

 

I don't have an opinion yet on how to get the most free space on the zero page, we can think about it later :] I want to write chess engines and I will need fast memory like air ;)

  • Like 1
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...