64 bit assembler > UASM Assembler Development

UASM 2.41 Release + WinInc 2.09

(1/15) > >>

johnsa:
New packages for UASM 2.41 are up as well as an updated version of WinInc with a number of fixes.

UASM 2.41 updates a number of additional compiler warnings, but most importantly a totally re-worked implementation of RECORD directive and operator.


--- Code: ---
.data

COLOR RECORD blink:1, back:3, intense:1, fore:3
safir COLOR <1, 2, 0, 4>

COBALT STRUCT
    pntr DWORD ?
    rc   COLOR <>
COBALT ENDS

cobalt COBALT <>

COLOR64 RECORD blink:8, back:8, intense:8, fore:8,blink1:8, back1:8, intense1:8, fore1:8
safir64 COLOR64 <224, 225, 226, 14, 224, 225, 226, 14>

.code

mov cl, COLOR<1, 7, 0, 1>
mov cobalt.rc, COLOR<1, 7, 0, 1>
mov rax,safir64




--- End code ---

In addition to RECORDS of 32bits, 64bit RECORDS can be declared in .data and manually referenced OR used inline in code if the destination is a 64bit GPR:


--- Code: ---
mov   rax,COLOR <224, 225, 226, 14, 224, 225, 226, 14>                        ; E0E1E20EE0E1E20E
mov   rcx,COLOR <224, 225, 226, 14, 224, 225, 226, 14>                        ; E0E1E20EE0E1E20E


--- End code ---

Git source updated in 2.41 branch and master.
Cheers
John

habran:
You can use 64 bit value direct in 64 bit registers:

--- Code: ---mov   rax,COLOR <224, 225, 226, 14, 224, 225, 226, 14>                        ; E0E1E20EE0E1E20E
--- End code ---
but that will throw an error:

--- Code: ---mov   cobalt.rc,COLOR <224, 225, 226, 14, 224, 225, 226, 14>                  ; E0E1E20EE0E1E20E
--- End code ---
and this as well:

--- Code: ---mov   ecx,COLOR <224, 225, 226, 14, 224, 225, 226, 14>                        ; E0E1E20EE0E1E20E
--- End code ---
this works fine:

--- Code: ---mov   ecx,COLOR <224, 225, 226, 14>                        ; E0E1E20E

--- End code ---
and this as well:

--- Code: ---mov   cobalt.rc,COLOR <224, 225, 226, 14>                  ; E0E1E20E
--- End code ---

habran:
UASM takes care if incorrect values used in RECORD 8)
this is from jimg source from this forum:

--- Code: ---    prtf "bear in mind that ML doesn't care if you enter stuff that doesn't match the specs for the record"
    ;but UASM cares, if you uncomment nex 2 lines it will throw errors
    ;mov dcbw.fbits,wBITRECORD<9,9,9,9,9,9,9,9,9,9,9,9,9,9>
    ;prtf "entering 9 for every field gives jibberish, should have cause assembly error - fbits=%x",dcbw.fbits

--- End code ---

habran:
DCB struct changed in winbase.h to this to be compatible with masm:

--- Code: ---BITRECORD RECORD fBinary:1,fParity:1,fOutxCtsFlow:1,fOutxDsrFlow:1,fDtrControl:2,fDsrSensitivity:1,fTXContinueOnXoff:1,fOutX:1,fInX:1,fErrorChar:1,fNull:1,fRtsControl:2,fAbortOnError:1,fDummy2:17

DCB STRUCT
  DCBlength     DWORD      ?
  BaudRate      DWORD       ?
  fbits         BITRECORD      <>
  wReserved     WORD       ?
  XonLim        WORD          ?
  XoffLim       WORD         ?
  ByteSize      BYTE        ?
  Parity        BYTE          ?
  StopBits      BYTE        ?
  XonChar       BYTE         ?
  XoffChar      BYTE        ?
  ErrorChar     BYTE       ?
  EofChar       BYTE         ?
  EvtChar       BYTE         ?
  wReserved1    WORD       ?
DCB ENDS

LPDCB typedef ptr DCB

--- End code ---

habran:
I believe that all issues with the SWITCH - ENDSWITCH block have been solved :t

Navigation

[0] Message Index

[#] Next page

Go to full version