Author Topic: Asmc source and binaries  (Read 28924 times)

nidud

  • Member
  • *****
  • Posts: 1735
    • https://github.com/nidud/asmc
Re: Asmc source and binaries
« Reply #195 on: September 06, 2019, 02:57:15 AM »
Added directive .ENUM

Added command line switch /Znk - Disable non Masm keywords.

Code: [Select]
x1 = 23.0
x2 = 0.271
x3 = 0.256
x4 = x2/x3
OXFACDc = x1 * x4
ConstantR8 OXFACD, OXFACDc
dont'work or it's not posible with /Zne option?

No, this is not possible with /Zne option. May I ask why you are using this option?

    x1 = 23.0
    x2 = 0.271
    x3 = 0.256
    x4 = x2 / x3
    x5 = x1 * x4

    x6 equ @CatStr(%x5)
    %echo x6
    end

24.34765625

HSE

  • Member
  • *****
  • Posts: 1107
  • <AMD>< 7-32>
Re: Asmc source and binaries
« Reply #196 on: September 06, 2019, 03:34:14 AM »
No, this is not possible with /Zne option.
Clear  :thumbsup:

May I ask why you are using this option?
 

Perfect now with /Znk  :thumbsup:

Thanks

nidud

  • Member
  • *****
  • Posts: 1735
    • https://github.com/nidud/asmc
Re: Asmc source and binaries
« Reply #197 on: September 06, 2019, 04:31:20 AM »
May I ask why you are using this option?
Perfect now with /Znk  :thumbsup:
:thumbsup:

Added a few changes to the .enum directive. This may be tweaked a bit more later but now this is possible (from parser.inc):

.enum special_token {
    T_NULL,
res macro tok, string, type, value, bytval, flags, cpu, sflags
    @CatStr(<T_>,@SubStr(<tok>,2)),
    endm
include special.inc
undef res
;; define tokens for SpecialTable (directives)
res macro token, string, value, bytval, flags, cpu, sflags
    @CatStr(<T_>,@SubStr(<token>,2)),
    endm
include directve.inc
undef res
    SPECIAL_LAST
}

nidud

  • Member
  • *****
  • Posts: 1735
    • https://github.com/nidud/asmc
Re: Asmc source and binaries
« Reply #198 on: September 13, 2019, 03:38:51 AM »
This is used in the parser, codegen, and expreval files now written in assembler.

 :thumbsup:

When macro.asm?  :biggrin: :biggrin:

I added macro.asm and expans.asm.

HSE

  • Member
  • *****
  • Posts: 1107
  • <AMD>< 7-32>
Re: Asmc source and binaries
« Reply #199 on: September 13, 2019, 07:37:09 AM »
Fantastic  :thumbsup:
Thanks.

nidud

  • Member
  • *****
  • Posts: 1735
    • https://github.com/nidud/asmc
Re: Asmc source and binaries
« Reply #200 on: September 17, 2019, 03:22:16 AM »
Added type to .enum

.enum name : byte {
    ok = 200,
    to_big = 300 ; error A2071: initializer too large for specified size
}

Memory operands now allows different size to be used. There is however no sign extension so all operations are (currently) unsigned.

foo proc b:byte, w:word, d:dword
    mov b,w
*    mov ax,w
*    mov b,al

    mov w,b
*    movzx eax,b
*    mov w,ax

    mov d,w
*    movzx eax,w
*    mov d,eax

foo endp