• Please review our updated Terms and Rules here

HMACRO11

Hunta

Veteran Member
Joined
Mar 23, 2021
Messages
823
Location
Samara, Russian Federation
A little information about the current project.
Macros still need to be ported, but they're the last thing to be ported.
The operating logic is being ported as closely as possible to MACRO-11, but without going overboard. For example, virtual memory management isn't being ported, it's been replaced with dictionaries. :)
And there's a feature built in that's NOT in MACRO-11, although it's still being refined and expanded. :)
Code:
      6                    .IF DF H$MACRO11
      7
      8                        .ENABL    EXT
      9    000000                LONGLABEL:
     10    000000                    .BLKW    1
     11                        .DSABL    EXT
     12
     13    000002                LONGLA123:
     14    000002                    .BLKW    2
M    15    000006                LONGLB123:
     16    000006                    .BLKW    2
M    17    000012                LONGLB234:
     18
     19    000012                    .PSECT
     20    000012    012700     000000'            MOV    #LONGLABEL, R0
     21    000016    012701     000002'            MOV    #LONGLA1, R1
     22
     23                    .ENDC
 
MACRO-11:
Code:
OQ    6    000000                CMP    #20, R1
      7
      8    000000    104350                 EMT    350
      9
     10                    .LIST    ME
     11
     12                        .MACRO    TEST    A1,A2=,?L1
     13                    L1:
     14                    A1 = 0
     15                        .ASCII    /A2/
     16                        .ENDM    TEST
     17
     18                    .MACRO    TEST2    A
     19                        ADD  A, R0
     20                    .ENDM
     21
     22                    .MACRO     CMP    src, dst
     23                        .WORD     20000
     24                        .MEXIT
     25                        .WORD    src, dst
     26                    .ENDM CMP
     27
     28                    .MDELE    CMP

vs

HMACRO-11
Code:
      6    000000    022701     000020         CMP    #20, R1
      7
      8    000004    104350                 EMT    350
      9
     10                    .LIST    ME
     11
     12                        .MACRO    TEST    A1,A2=,?L1
     13                    L1:
     14                    A1 = 0
     15                        .ASCII    /A2/
     16                        .ENDM    TEST
     17
     18                    .MACRO    TEST2    A
     19                        ADD  A, R0
     20                    .ENDM
     21
     22                    .MACRO     CMP    src, dst
     23                        .WORD     20000
     24                        .MEXIT
     25                        .WORD    src, dst
     26                    .ENDM CMP
     27
     28                    .MDELE    CMP
 
project rationale and objectives
First goal is to have an exact clone of MACRO-11 working on Windows. Not just 'inspired by' MACRO-11, and not coded in C.

The second goal is to create an exact analogue of MACRO-11 that works on "kernel module" + "UI module" principle (this was implemented from the start), so that the kernel can be used by other programs (the first goal is DisAsm11).

The third goal is to expand the capabilities of MACRO-11 in a manageable way.
 
As of now, the only remaining task is to implement and port the functionality for the following MACRO-11 directives:
.LIBRA
.IRP
.IRPC
.MCALL
.NARG
.NCHR
.NTYPE
.REPT
 
Hallelujah!!!!
Code:
>MACRO11X.exe rt11 SPEED3.MAC

>MACRO11X.exe rt11 ARITH.MAC

>RT11.EXE LINK/MAP:SPEED3/EXE:SPEED3 SPEED3,ARITH

>fc SPEED3.LST Etalons\SPEED3.LST /u /t
Comparing files SPEED3.LST and Etalons\SPEED3.LST
***** SPEED3.LST
Elapsed time:
rt11 SPEED3.MAC
***** Etalons\SPEED3.LST
Elapsed time:
DK:SPEED3/E:BMK,DK:SPEED3=DK:SPEED3
*****


>fc SPEED3.OBJ Etalons\SPEED3.OBJ   /b
Comparing files SPEED3.OBJ and Etalons\SPEED3.OBJ
0000001E: 3D 08
0000001F: AF B2
00000020: 7C 0C
00000021: 1A 20
00000024: 40 03
00000025: 79 00
00000026: 08 6C
00000027: B2 AB
00000028: 0C B0
00000029: 20 3B
0000002A: 48 40
0000002C: 03 00
00000036: 6D 64
00000038: 20 B0
00000039: 85 3B
0000003E: 6C 6D
0000003F: AB A9
00000040: B0 20
00000041: 3B 85
00000046: 64 3D
00000047: A9 AF
00000048: B0 7C
00000049: 3B 1A
0000004A: 40 48
0000004C: 00 40
0000004D: 00 79

>fc ARITH.lst  Etalons\ARITH.lst  /u /t
Comparing files ARITH.lst and Etalons\ARITH.LST
***** ARITH.lst
Elapsed time:
rt11 ARITH.MAC
***** Etalons\ARITH.LST
Elapsed time:
DK:ARITH,DK:ARITH/E:BMK=DK:ARITH
*****


>fc ARITH.obj  Etalons\ARITH.OBJ    /b
Comparing files ARITH.obj and Etalons\ARITH.OBJ
0000002E: 75 6C
00000030: 20 B0
00000031: 85 3B
00000034: 00 68
00000036: 6D 75
00000037: A9 AB
0000003C: 4A 00
0000003E: 6C 64
0000003F: AB A9
00000044: 68 A4
00000046: 64 6D
00000048: B0 20
00000049: 3B 85
0000004C: A4 4A

>fc SPEED3.SAV Etalons\SPEED3.SAV   /b
Comparing files SPEED3.SAV and Etalons\SPEED3.SAV
FC: no differences encountered
Comment: The differences in the obj files are the different order in which the global symbol information is written. But! The information itself is identical!

The porting started on May 24, 2026, and was almost fully implemented—with serious conditional compilation testing and macros—on August 3, 2026.

Still not implemented yet:
.LIBRA
.MCALL

SPEED3 sources: http://www.kpxx.ru/Soft/Utils/Speed3/Sources
 
Last edited:
The same order of .PSECT and global symbols!!
Code:
Comparing files TEST.OBJ and TEST.ETALON.RT.OBJ
FC: TEST.ETALON.RT.OBJ longer than TEST.OBJ


Comparing files TEST.obj.dump and TEST.ETALON.RT.OBJ.DUMP
FC: no differences encountered

Comparing files TEST.lst and TEST.ETALON.RT.LST
***** TEST.lst
Elapsed time:
rt11 TEST.MAC
***** TEST.ETALON.RT.LST
Elapsed time:
DK:TEST,DK:TEST/E:BMK=DK:TEST
*****

Comparing files TEST.MAP and TEST.ETALON.RT.MAP
FC: no differences encountered

Comparing files TEST.SAV and TEST.ETALON.RT.SAV
FC: no differences encountered

Code:
Comparing files SPEED3.LST and K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\1\SPEED3.LST
***** SPEED3.LST
Elapsed time:
rt11 SPEED3.MAC
***** K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\1\SPEED3.LST
Elapsed time:
DK:SPEED3/E:BMK,DK:SPEED3=DK:SPEED3
*****

Comparing files SPEED3.OBJ and K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\SPEED3.OBJ
FC: no differences encountered

Comparing files ARITH.lst and K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\1\ARITH.LST
***** ARITH.lst
Elapsed time:
rt11 ARITH.MAC
***** K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\1\ARITH.LST
Elapsed time:
DK:ARITH,DK:ARITH/E:BMK=DK:ARITH
*****

Comparing files ARITH.obj and K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\ARITH.OBJ
FC: no differences encountered

Comparing files SPEED3.MAP and K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\SPEED3.MAP
FC: no differences encountered

Comparing files SPEED3.SAV and K:\REPO\FORDEBUG\MACRO11\SPEED3.ETALONS\SPEED3.SAV
FC: no differences encountered
 
The .MCALL directive was implemented, and now - all MACRO-11 functionality was ported!!

Added support for parsing RT-11 .MLB libraries (including SYSMAC.SML) of format version 5.0, though earlier format versions require further review.
Laid the foundation for RSX .MLB libraries (including RSXMAC.SML), with parser verification and finalization pending.

Testing of result is in progress
Code:
TEST3    HMACRO V05.06/Windows Saturday 08-Aug-26 03:20  Page 1


      1                        .TITLE    TEST3
      2                        .IDENT    /V01/
      3
      4                        .MCALL    .EXIT, .PRINT
      5
      6    000000                START::
      7    000000                    .PRINT    #MESS
      8    000006                    .EXIT
      9    000010                MESS::
     10    000010       110        145        154         .ASCII    /Hello, World!/
    000013       154        157        054
    000016       040        127        157
    000021       162        154        144
    000024       041
     11                        .EVEN
     12
     13        000000'                .END    START
TEST3    HMACRO V05.06/Windows Saturday 08-Aug-26 03:20  Page 1-1
Symbol table

MESS    000010RG     START   000000RG     ...V1 = 000003

. ABS.    000000    000    (RW,I,GBL,ABS,OVR)
          000026    001    (RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 0 Words ( 0 Pages)
Size of core pool: 0 Words ( 0 Pages)
Operating  system: RT-11 (Under Windows)

Elapsed time: 00:00:00.34
rt11 TEST.MAC

Code:
Comparing files TEST.OBJ and TEST.ETALON.RT.OBJ
FC: TEST.ETALON.RT.OBJ longer than TEST.OBJ


Comparing files TEST.obj.dump and TEST.ETALON.RT.OBJ.DUMP
FC: no differences encountered

Comparing files TEST.LST and TEST.ETALON.RT.LST
***** TEST.LST

TEST3    HMACRO V05.06/Windows Saturday 08-Aug-26 03:20  Page 1

***** TEST.ETALON.RT.LST

TEST3    MACRO V05.06R Saturday 08-Aug-26 03:20  Page 1

*****

***** TEST.LST
     13        000000'                .END    START
TEST3    HMACRO V05.06/Windows Saturday 08-Aug-26 03:20  Page 1-1
Symbol table
***** TEST.ETALON.RT.LST
     13        000000'                .END    START
TEST3    MACRO V05.06R Saturday 08-Aug-26 03:20  Page 1-1
Symbol table
*****

***** TEST.LST
Work  file writes: 0
Size of work file: 0 Words ( 0 Pages)
Size of core pool: 0 Words ( 0 Pages)
Operating  system: RT-11 (Under Windows)

Elapsed time: 00:00:00.34
rt11 TEST.MAC
***** TEST.ETALON.RT.LST
Work  file writes: 0
Size of work file: 10570 Words  ( 42 Pages)
Size of core pool: 16128 Words  ( 63 Pages)
Operating  system: RT-11

Elapsed time: 00:00:00.02
DK:TEST,DK:TEST=DK:TEST
*****

Comparing files TEST.MAP and TEST.ETALON.RT.MAP
FC: no differences encountered

Comparing files TEST.SAV and TEST.ETALON.RT.SAV
FC: no differences encountered

Code:
>MACRO11X.exe rt11 TEST.MAC

>RT11.EXE link/map:test test

>RT11.EXE run test

Hello, World!
 
Last edited:
And SPEED3
Code:
Comparing files SPEED3.LST and SPEED3.ETALONS\SPEED3.LST
***** SPEED3.LST
Elapsed time:
rt11 SPEED3.MAC
***** SPEED3.ETALONS\SPEED3.LST
Elapsed time:
DK:SPEED3/E:BMK,DK:SPEED3=DK:SPEED3
*****

Comparing files SPEED3.OBJ and SPEED3.ETALONS\SPEED3.OBJ
FC: SPEED3.ETALONS\SPEED3.OBJ longer than SPEED3.OBJ


Comparing files ARITH.lst and SPEED3.ETALONS\ARITH.LST
***** ARITH.lst
Elapsed time:
rt11 ARITH.MAC
***** SPEED3.ETALONS\ARITH.LST
Elapsed time:
DK:ARITH,DK:ARITH/E:BMK=DK:ARITH
*****

Comparing files ARITH.obj and SPEED3.ETALONS\ARITH.OBJ
FC: SPEED3.ETALONS\ARITH.OBJ longer than ARITH.obj


Comparing files SPEED3.MAP and SPEED3.ETALONS\SPEED3.MAP
***** SPEED3.MAP
RT-11 LINK  V05.45     Load Map     Saturday 08-Aug-2026 03:38  Page 1
SPEED3.SAV       Title:    SPEED     Ident:    SP.03     
***** SPEED3.ETALONS\SPEED3.MAP
RT-11 LINK  V05.45     Load Map     Saturday 08-Aug-2026 02:54  Page 1
SPEED3.SAV       Title:    SPEED     Ident:    SP.03     
*****

Comparing files SPEED3.SAV and SPEED3.ETALONS\SPEED3.SAV
FC: no differences encountered
 
Double gun - double fun!

Or - when a programmer has nothing better to do - he configures feature :)

Code:
TEST3    MACRO Vnn.nna Weekday dd-mmm-yy hh:mm  Page 1


      1                        .TITLE    TEST3
      2                        .IDENT    /V01/
      3
      4                        .MCALL    .EXIT, .PRINT
      5
      6                        .ENABL EXT
      7
      8    000000                Mess:
      9    000000       110        145        154         .ASCIZ    /Hello, World!/
    000003       154        157        054
    000006       040        127        157
    000011       162        154        144
    000014       041        000
     10    000016                MESS:
     11    000016       117        156        143         .ASCIZ    /Once more - Hello, World!/
    000021       145        040        155
    000024       157        162        145
    000027       040        055        040
    000032       110        145        154
    000035       154        157        054
    000040       040        127        157
    000043       162        154        144
    000046       041        000
     12                        .EVEN
     13
     14    000050                开始:
     15
     16    000050                    .PRINT    #Mess
     17    000056                    .PRINT    #MESS
     18    000064                    .EXIT
     19
     20        000050'                .END    开始
TEST3    MACRO Vnn.nna Weekday dd-mmm-yy hh:mm  Page 1-1
Symbol table

  000050R      MESS  000000R      MESS  000016R      ...V1= 000003
TEST3    MACRO Vnn.nna Weekday dd-mmm-yy hh:mm  Page 1-2
Extended Symbol table

  000000R    Mess
  000016R    MESS
  000050R    开始

. ABS.    000000    000    (RW,I,GBL,ABS,OVR)
          000066    001    (RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads:
Work  file writes:
Size of work file:
Size of core pool:
Operating  system:

Elapsed time:
rt11 TEST.MAC

Code:
>MACRO11X.exe rt11 TEST.MAC 

>RT11.EXE link/map:test test 

>RT11.EXE run test 

Hello, World!
Once more - Hello, World!
 
Back
Top