News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Script Engine beta 2

Started by hutch--, January 31, 2006, 02:44:43 AM

Previous topic - Next topic

hutch--

I have done alot more work on this and it is now handling the minimum purpose I intended it to, a fast text generator aimed at code generation. The labels are now properly tested for either duplicates or a jmp to a missing label. I have added a multiple choice dialog "select" which is list box based so it is clear and fast to use. The file IO commands are more or less finished and there are a couple of test templates that will output masm code.

[attachment deleted by admin]
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

daydreamer

makes me want to add extension that helps produce conditionals for parallel execution, just from simple IF's
ok, limited to IF , then do arithmetic calculation, else notdo arithmetic calculation
but alot more readable and easier for people not used to parallel thinking

hutch--

I will post the next version when I get a bit more work done but I have added string comparison with "if$" using the same logic as the "if" method which seems to be working OK and have added named variables to the numbererd variables so that the script looks more like a programming language. It will probably need a case insensitive version as well, something like "ifi$".

The problem with conventional IF blocks is I have to use something like a recursive descent parser in the loader and I am mainly worried about slowing the loader down too much. The string runtime engine seems to be fast enough and if I can transfer some of the runtime testing to the loader, it may get a bit faster but I am stuck with balancing load to run speed.

I have the loader and the runtime engine completely seperate and they can easily be seperated so that the loader component builds a runnable file for the runtime engine and this effectively removes the speed issue with the loader and I may go that path as an option a bit later.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Ghirai

This sounds very good :U

Do you think it will evolve in something like Perl?
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

hutch--

I have a fair bit more work done on it now. named variables makes the code a lot easier to read and write. I have just completed a hash table design that I am using in the loader and what is the start of a pre-processor which allows me to use more equates without a loader speed penalty. I gave the runtime engine a genuine hammering and have the instruction fetch rate up to about 1.5 million a second which is a reasonable improvement from the last figure of about 1 million. I have also added directory runtime commands that appear to be working OK at the moment.

Its now capable of code of this style. I need to tidy up a few more things and then I will post it.


; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

  ; This is to test the instruction
  ; fetch speed with minimum runtime
  ; functionality for the loop.

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    INTEGER lref            ; loop reference variable
    INTEGER lcnt            ; loop counter
    STRING  result$         ; string for result display

    msgbox "Start" "Loop speed test" MB_OK

    lref = 150000           ; assign the loop reference count
    lcnt = 0                ; set counter to zero

    clock 0                 ; start timing

  ; *******************************************************
  ; the following loop has 10 instructions which are looped
  ; 150000 times to produce 1 million instruction fetches.
  ; *******************************************************
  start:
    nop                     ; nop is a no content
    nop                     ; instruction mainly
    nop                     ; for testing
    nop
    nop
    nop
    nop
    add lcnt, 1
    if lcnt != lref         ; while lref is not equal to lcnt
    goto start              ; loop back to start

    clock 1                 ; end timing and store results in #0

    result$ = cat$ "1.5 Million instruction fetches in " #0 " milliseconds"
    msgbox result$ "Timing result" MB_OK

    end

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php