ASM8 v1.33 & ASM11 v2.10 updated available for download

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ASM8 v1.33 & ASM11 v2.10 updated available for download

8,949 Views
tonyp
Senior Contributor II
Download the latest ASM8 (v1.33) here: http://www.aspisys.com/freeasm8.zip


I have also decided to make publicly available the most recent version of ASM11 (v2.10) and whatever updates may follow. This version has many features not available on the last public release (v1.84). Read the included PDF for more. Get it here: http://www.aspisys.com/freeasm11.zip

 

In both cases, three executables are included (DOS, Win32, and Linux i386).

Message Edited by tonyp on 2009-08-27 07:46 PM
Labels (1)
Tags (3)
0 Kudos
47 Replies

908 Views
tonyp
Senior Contributor II

Well, I have no way to test it but, maybe, you could.  I compiled it with the 64-bit version of the cross-compiler and it gave no compilation errors.  But since I can't run it, other than it compiles OK, I have no clue if it works.   If you want to try it, and let me know if there is any luck, get the test executable here and rename it to asm8.exe  If people find that it works well, I'll include it in the distribution.

 

Regarding ease of use, well, "beauty is in the eye of the beholder".  To me, it can't get any easier.

 

Regarding the RS08, no, sorry.

 

0 Kudos

908 Views
tonysofla
Contributor I

The DOS version you run from command line that I understand, but how do you run the win32 version?

 

It can only be run from other programs?, someone made a small gui for it yet?

0 Kudos

908 Views
tonyp
Senior Contributor II

All versions run as command-line or console applications.

 

You can configure an editor (like PNotepad I've been using, lately) to have the assembler called at the press of a function-key and any errors displayed on the editor.  But, I'm a command-line person.  I like to type, not hunt-and-click.  So, I always keep a console window open, and do most things from there.   But, having the editor link to the assembler is most useful when editing to frequently  check there are no assembly errors, as you add/modify code.

 

So, was that the problem, or did the Win32 version not run at all, giving some kind of error?  Did anyone try the Win64 binary?

 

0 Kudos

908 Views
tonyp
Senior Contributor II

I have updated the HC08/9S08 version of the 64/48/40/32/24/16-bit signed/unsigned stack-based math routines to include a series of macros (which also serves as a nice example of using "macro chaining/nesting") to make using these routines for fixed-memory variables as simple as:

                       @Div32 Dividend,Divisor,Quotient

Link: stakmath.sub

Hope you like it.

0 Kudos

908 Views
tonyp
Senior Contributor II

One small update, which adds:

 

Two new directives, #TRACEON and #TRACEOFF, which allow stepping into the macro body code (as if it were a subroutine) while debugging.  Default is OFF.   When you want to debug code inside a complex macro, you can place the directive either inside the macro using

#PUSH

#TRACEON

<instructions>

#PULL

or, globally, affecting all macros.  Or, you can place it just around the @macro invocation,

 

By the way, you can completely skip over macros by using #MAPOFF in place of #TRACEON above.

 

Links ASM8 and ASM11

 

0 Kudos

908 Views
tonysofla
Contributor I

Programmers notepad is what i was looking for.

But what are the proper settings to get it to assemler for exaple s08 code with error reporting in the same window?

 

See attached jpg what settings i;m talking about.

0 Kudos

908 Views
tonyp
Senior Contributor II

OK, here's some info on how to setup PNotepad to work with ASM8

 

I'm making some assumptions based on how I have my PC setup.  So, there is a c:\utils directory and PNotepad is installed under the "c:\Program Files" path.  If not, we'll have to make the needed adjustments to the various paths shown

 

You need to place the asm8.scheme in the schemes subdirectory (of PNotepad).  Mine shows as

"C:\Program Files\PNotepad\schemes\asm8.scheme"

 

Place the batch file doasm8.bat, the assembler and its .cfg file in c:\utils

 

Then follow the pictures.

 

I hope I'm not forgetting anything as it's been a while since I had this setup.  And someone (from this list, I think, sorry I can't remember who) sent me the original scheme, which I adjusted a bit.

 

0 Kudos

908 Views
tonyp
Senior Contributor II

New and updated code examples for ASM8 (root of all examples is here)

64/48/40/32/24/16-bit stack-based math library

Julian date conversion (An example of using practically only macros to perform several calculations.)

For a clean compilation, you'll also need:

Macros

General definitions and this

Check back every now and then as there might be updates from time to time.

Hope you like them (and let me know if you find any bugs).

0 Kudos

908 Views
tonyp
Senior Contributor II

One more minor but useful update.

 

Macros will always appear as single instructions while source-level stepping.  No need for the #Push, #MapOff ... code ... #Pull trick after the first instruction to have the debugger see the macro as one instruction. ( #TraceOn will still allow source stepping every single macro instruction, and it can be used for all macros, a specific macro, or a specific macro invocation.)

 

Links: ASM8 and ASM11

 

 

0 Kudos

908 Views
tonyp
Senior Contributor II

Since v5.00 macros can optionally be called without the @ prefix (except when the macro name collides with a built-in [pseudo-]operation, in which case the @ is required).  Not my preferred choice for various reasons, but some people like it this way.  So, the option is now there.

 

It also adds the ~#~ placeholder for detecting immediate mode.  You can check for it to make the macro behave differently for immediate mode first operand.  See updated macro examples.

 

The current version is 5.02 which also includes some minor bug fixes, so it's a recommended download.

Links: ASM8 and ASM11

 

0 Kudos

908 Views
tonyp
Senior Contributor II

With this update, it's now possible to compare a macro parameter to specific text (case-insensitive).  For example:

 

 

brset               macro     PinName,Address     ;BRSET for Pin names          #ifz ]~1~                    brset     ~1~.,~1~,~2~                    mexit          #endif          #ifparm ~2~ = *Address$$$          psha                    lda       ~1~                    and       #~1~_                    pula                    bne       Address$$$                    mexit          #endif                    psha                    lda       ~1~                    and       #~1~_                    pula                    bne       ~2~                    endm

 (In the above example, the * address is treated specially, or else the expanded macro will not re-test the condition, as expected, when ~2~ expands to *).

 

 

Links: ASM8 and ASM11

 

0 Kudos

908 Views
tonyp
Senior Contributor II

More macro-related changes since last update (here).

 

* Added ~label~ placeholder for passing left-side label into macro.  Can be used to write better EQU-like macros.

* Allowed comments next to IFPARM / IFNOPARM directives

* #IFSPAUTO (ASM8 only) lets you know if you're in that mode. Can be used to write better macros when passing SP indexed operands to general-purpose macros.  See example for some ideas.

* #PARMS allows definition of space using SPACE keyword.

* Added ~n,~ and ~,n~ versions of macro parameter placeholders.  Can be used to write smarter macros with indexed mode operands.  See example macros for use.

* Minor bug fix (non-@ macro invocation would not recognize parm separator override correctly).

 

Updated sample macros (they will only assemble with latest ASM8).

Links: ASM8 and ASM11

 

(By the way, I'm a bit surprised at how many downloads ASM11 gets.  It often outnumbers ASM8.  Anyway, most of my code examples are 68HCS08-based because that's what I use mostly, but you can easily transfer the concept to the 68HC11.)

 

0 Kudos

908 Views
tonyp
Senior Contributor II

For those few who follow this thread, we're up to version v5.50 now.  From last update in this forum then, these are the main changes:

 

* Some bug fixes related to MMU mode's "Attempt to jump to page" not always accurate warnings (ASM8 only), macro parm placeholders.

* New placeholders ~#n~ (n 1 to 9) to return the text after the # for possible use in expressions.

* New #MCF mode to make macros have precedence over instruction names (if there is a name collision).

* Empty macro parameters (e.g.,with "@macro 1,,3" the second parameter is empty) no longer require at least a space between the delimiters.

 

Get the latest build here: ASM8 and ASM11

 

0 Kudos

908 Views
tonyp
Senior Contributor II

Here's what's new since v5.50:

 

* Added \, and • macro placeholders to maintain the original macro call's parameter separator (for use with looping, etc.)

* Added #CYCLES directive to either reset the :CYCLES counter or set it to any arbitrary value

* (ASM8 only) Added ability to define a stack offset label along with the corresponding push (#SpAuto & #ExtraOn modes) to improve code readability (in my very subjective view, at least).

* New internal symbols, mainly: :MACROLOOP (macro loop counter), :MACROINDEX| (separate invocation counter for each macro).  These add some flexibility when working with macros.

* Several minor improvements in existing features.

 

Several of my code examples have been updated.  Links: ASM8 and ASM11

 

0 Kudos

908 Views
tonyp
Senior Contributor II

Changes since last update in this group.


* Added :MACRONEST counter.

* Added: :INDEX counter for use from inside macros.  Increments only on access.
* Added: Ability to reset specific macro counters by calling as %macro
* Added: "Unresolved expression" error for {expr} that can't be evaluated.
* Added: ~@~ and ~@@~ macro placeholder shortcuts for passing all/remaining parms to another macro or self while looping.

* Added: #HomeDir with no path returns to original file's home directory.

* Improved: Allowed {expressions} anywhere in macro text.
* Improved: Trailing commas due to null macro placeholders automatically removed.
* Improved: #ENDIFs no longer show with -LC- (ListConditionals=Off) option, giving a much cleaner listing w/out showing any conditional directives (except for those within macro definitions).
* BugFix: SET on previous implied EQU value (next to code) didn't work correctly.

* BugFix: #HomeDir could point to wrong directory between Pass1 and Pass2 (if not placed before any #Include directives.)


Links: ASM8 and ASM11


0 Kudos

908 Views
tonyp
Senior Contributor II

One more update that adds macro parameter substring extraction capability.   As an example, this is an assembler listing of a macro that creates a constant string with the month passed to it as number.

 

 

    1                           ;*******************************************************************************    2                           ; Form a constant string (FCC) with the given month name and optional max length    3                               4                           MonthName           macro     MonthNumber[,MaxLength]    5                                     #if :loop = 1    6                                               @~0~      ~1~,~2~,January,February,March,April,May,June,July,August,September,October,November,December    7                                     #endif    8                                               fcc       @@~{~1~+2}.1.~2~~@@    9                                               endm   10                              11      F600                                     org       *   12                              13                                               @MonthName          :month   13                                               @MONTHNAME      :month,,January,February,March,April,May,June,July,August,September,October,November,December   13 F600.5365 7074 656D                           fcc       'September'   13      6265 72            13                                               endm   14                                               @MonthName          :month,4   14                                               @MONTHNAME      :month,4,January,February,March,April,May,June,July,August,September,October,November,December   14 F609.5365 7074                                fcc       'Sept'   14                                               endm

(I hope the code window doesn't mess up the formatting too much)

 

Links: ASM8 and ASM11

 

 

0 Kudos

908 Views
tonyp
Senior Contributor II

Changes since v6.30


* Several minor bug fixes. (e.g., :smileyshocked: now works).

* @@ changed to \@ to avoid certain syntax ambiguities.

* Added MTOP pseudo-instruction to cause an immediate jump to the top of the currently executing macro.

* Added :smileyvery-happy:OW (day-of-week) internal symbol for compilation day-of-week.

* Added #HideMacros & #ShowMacros (default) directives for use with -LC- command-line option.  #HideMacros removes ALL references to macro definitions and expansions.  Only the macro expansions are shown.

* Nested { expr } are now accepted.  For example {~1~+{~2~*~3~}}

* { expr } can now appear in any operand, even outside of strings and macros.  Provided there are no forward references in an { expr }, it can also act as 'parentheses' for constant expressions to override the default left-to-right operator priority.  For example: 1+{2*3} gives 7.

* ~n.s.l~ style placeholders can now accept the ~label~ part (~label.s.l~ format) or any constant string, (~'string'.s.l~).  The string can be used as a small constant data array, like in the following single-line macro example which produces a string (FCC) with the assembly time day-of-week name:


 

;*******************************************************************************; Form a constant string (FCC) with today's day nameToday               macro                    fcc       \@~'Sunday   Monday   Tuesday  WednesdayThursday Friday   Saturday'.{:dow*9+1}.9~\@                    endm                    org       *                    #HideMacros                    @today

 

Links: ASM8 and ASM11 and (updated) Code Examples

 

0 Kudos

908 Views
tonyp
Senior Contributor II

One more update, which adds local labels at an arbitrary level (e.g. subroutine).  The keyword PROC, or the directive #PROC can be used to change scope.  For example:

 

 

    1      F600                                     org       *    2                               3      F600                 ScopeA              proc    4 F600:2705 (F607)     [ 3]                     beq       Next@@    5 F602:21FE (F602)     [ 3] Loop@@              brn       *    6 F604:4A              [ 1]                     deca    7 F605:26FB (F602)     [ 3]                     bne       Loop@@    8 F607:9D              [ 1] Next@@              nop    9                              10      F608                 ScopeB              proc   11 F608:2705 (F60F)     [ 3]                     beq       Next@@   12 F60A:21FE (F60A)     [ 3] Loop@@              brn       *   13 F60C:4A              [ 1]                     deca   14 F60D:26FB (F60A)     [ 3]                     bne       Loop@@   15 F60F:9D              [ 1] Next@@              nop

 

 

Links: ASM8 and ASM11

 

0 Kudos

908 Views
tonyp
Senior Contributor II

A major update for ASM8/ASM11.  Changes since last time I wrote here:

 

* Added nested macros (use @@ instead of @, or %% instead of %).  (Prefer using 'macro chaining' or MTOP loops when possible, for efficiency.)

* Added #MLIMIT to set the max. macro nesting level.

* Added #IF[NO]STR for checking if a macro parameter is a string or not.

* Added MSET to allow changing a macro parameter from within the macro.

* Added MDEF to allow default macro parameter definitions.

* Although a macro cannot #INCLUDE files, it can now 'chain' to an #INCLUDE file.

* Several minor bug fixes and internal improvements in various features.

 

Updated code examples to include some of the new functionality.

Links: ASM8 and ASM11

 

(As always, please report possible bugs.)

 

0 Kudos

908 Views
tonyp
Senior Contributor II

Updated ASM8/ASM11 once more.  (This is a recommended download as it also includes several internal improvements.)  Changes since v7.00:

 

* Added MSWAP to swap any two macro parameters by index.

* Added DEF to assign default value to symbol.  Same as EQU inside #IFNDEF .. #ENDIF

* Command-line symbol definition handling improved (PASS2 re-initializes).

* Added new internal symbols: :smileytongue:C, :smileytongue:PC, :smileysurprised:CYCLES

* BugFix: Local macros no longer get dropped by a following #INCLUDE.

* BugFix: When assembling multiple files in one command #HOMEDIR was not restored between main files.

* Several internal improvements (eg. #PUSH/#PULL are more memory efficient).

 

Updated code examples to include some of the new functionality.

Links: ASM8 and ASM11

 

(As always, please report possible bugs.)

0 Kudos

908 Views
tonyp
Senior Contributor II

Some more enhancements for ASM8/11 since last I wrote here.  Added the following:


* MDO ... MLOOP for creating consecutive independent local loops inside a macro.  MLOOP allows for optional termination value.  It can be used to easily write significantly faster-executing, smaller, and better code-generating macros.  See example listing at the end.

* Improved MTOP now allows for optional termination value (like with MLOOP).

* == (instead of for case-sensitive macro parameter comparisons.

* MREQ to specify required macro parameters with optional related error message.

* MSTR to convert parameter(s) to string (if not already a string).

* MERROR (combines #Error with mexit).

* IFB/IFNB aliases for IFNOPARM/IFPARM

* #EXIT any #INCLUDE file before reaching the end-of-file.

* New internal symbols (eg., :TEMP).

 

Links: ASM8 and ASM11

 

P.S. Keep me posted if you find any "undocumented behavior".

 

Listing for MDO .. MLOOP example:

 

    6                Toggle macro     PinName[,PinName]*    7                       mreq      1:PinName[,PinName]*    8                       psha    9                       mdo   10                       mswap     1,:mloop   11                       lda       ~1~   12                       eor       #~1~_   13                       sta       ~1~   14                       mloop     :mloop+:{:mloop+1}   15                       pula   16                       endm   23                       @toggle   XXX,YYY   23                       mreq      1:PinName[,PinName]*   23 182C:87   [ 2]        psha   23                       mdo   23                       mswap     1,:mloop   23 182D:B600 [ 3]        lda       XXX   23 182F:A802 [ 2]        eor       #XXX_   23 1831:B700 [ 3]        sta       XXX   23                       mloop     :mloop+:2   23                       mswap     1,:mloop   23 1833:B600 [ 3]        lda       YYY   23 1835:A804 [ 2]        eor       #YYY_   23 1837:B700 [ 3]        sta       YYY   23                       mloop     :mloop+:3   23 1839:86   [ 3]        pula   23                       endm

 

 

0 Kudos