The below code causes Unhandled exception at 0x004028CB in fasmg.exe: 0xC0000005: Access violation reading location 0x002DA7FD.
The problem is in calling store from store
true := 1
false := 0
struct MY
a rw 1
end struct
_my MY a: 'a'
macro struct? name
struc rb? n
label .
rb n
.__length = $ - .
.__size = 1
end struc
struc rw? n
label .
rw n
.__length = $ - .
.__size = 2
end struc
macro store name, value, i
virtual at 0
dbx .name.__length: value
len = $ - i * .name.__size
end virtual
store value:len at .name + i * .name.__size
end macro
macro end?.struct?!
end namespace
irp def, args
local param, value, i, len, is_seq
value equ
i = 0
len = 0
is_seq = false
match name:value, def
store name, value, i
end match
end irp
end struc
virtual at 0
name name
sizeof.name = $
end virtual
purge end?.struct?
end macro
struc name args&
label .:sizeof.name
namespace .
end macro