For defining data structures use the same format like all other referances
viz seg:off ds,<options> label,comment
define your structure details one line per item below DS without seg:offset
SR normally creates a file <infile.SDF>
with sdf extension (sourcer default definition file)
copy paste that file as <infile.def>
and start modifying it to suit the needs.
c:\> sr foo.com (define your prefs for assembler etc here and press g)
c:\> ren foo.sdf foo.def
c:\> edit foo.def
seg_a:3127 da, r 0D ; data_137
seg_a:3157 da, r 55 somesymbol ;
seg_a:31AC ds, r 0020 MyStruct ;// struct defined here (Array of 0x20 structs)
dd, c 4 int blah ; member 1 // need foo.rem file for comments
dw short foo ; memeber 2
dw short yaa ; member 3
da, r 6 pathname ; member 4
dd magic ; member 5
seg_a:3BB0 da, r 29 ; data_185
alt+f alt+ s
c:\> sr foo.def
output (comments are from foo.rem file (you will have a sample file testyn.rem in your installation copy paste rename foo.rem and edit that file if you need comments)
C:\>grep -i -A 20 "This is mystruct" Foo.LST
3BC5:31AC B9F9 0008 int dd 8B9F9h
; This is mystruct
; defined as
; typeded struct _MYSTR
; {
; ulong
; short
; short
; char[06]
; ulong
; }Mystr, *PMystr;
3BC5:31B0 45E8 short dw 45E8h
3BC5:31B2 E8F5 short dw 0E8F5h
3BC5:31B4 10 FC E8 C6 EC E8 pathname db 10h, 'ⁿΦ╞∞Φ'
3BC5:31BA DB84 B800 magic dd 0B800DB84h
3BC5:31BE 0006 36E8 int1 dd 36E80006h
3BC5:31C2 E8F0 short1 dw 0E8F0h
3BC5:31C4 F5A7 short1 dw 0F5A7h
3BC5:31C6 B9 08 00 pathname1 db '╣', 8, 0
3BC5:31C9 E8 2C F5 db 'Φ,⌡'
3BC5:31CC 61E8 B9FA magic1 dd 0B9FA61E8h
3BC5:31D0 0008 23E8 int2 dd 23E80008h
C:\>