Author Topic: .data inside proc  (Read 1009 times)

jimg

  • Member
  • ***
  • Posts: 463
.data inside proc
« on: January 26, 2019, 04:55:05 AM »
This is a little strange.    It showed up when I picked up an old program to work on.

When I declare the variable dvde outside the proc, there are no errors.
When I declare the variable inside the proc, I get Error A2210: Syntax error: dvde

This obviously has something to do with RECORD but no clues beyond that.

It also happens in version 2.46, I didn't keep any older versions to test.


Code: [Select]
.686
.model Flat, Stdcall
option Casemap :None

.data
tsx RECORD Dv:16,De:16
.code
tst proc
.data
dvde tsx <0,0>
.code
ret
tst endp

.code
Program:
ret
End Program

jimg

  • Member
  • ***
  • Posts: 463
Re: .data inside proc
« Reply #1 on: January 26, 2019, 05:12:04 AM »
I found some old versions in an archive.   I tested back to version 2.41 and the problem still exists.    Tested old JWasm and the problem was gone.

johnsa

  • Member
  • ****
  • Posts: 810
    • Uasm
Re: .data inside proc
« Reply #2 on: January 26, 2019, 11:55:34 PM »
Hi,

I've fixed this now for 2.48 it was due to us supporting expansion of records directly in instructions as operands.
It wasn't checking that the it wasn't a regular data definition while inside a code block.

John