6

I am working with version 8 circa 2000 of Sourcer from V Communications. They no longer support it. I've long since lost the manual.

There is a definition file that you edit as you discover the code you are dissembling. In that file's data section you can create a data structure using the DS command. I can't remember the syntax.

1
  • I wish I could help, I borrowed my manual to a colleague some years ago and he lost it :(
    – 0xC0000022L
    Commented Apr 14, 2014 at 1:06

2 Answers 2

1

I, too would like to see a Sourcer manual. In partial answer, the installation contains a file SAMPLE2.DEF that contains the following text:

          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
              SAMPLE2 DEFINITION FILE
          ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 1: CONTROL INFORMATION   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

uP               = 8088


 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 2: RANGE DEFINITION      ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

 ════ Segments ══════════════════════════

  begin   ....   end   ..   default  ..    seg ...  seg   
 seg:off  ..   off  ..   ds  ..   es  ...   type . size  
 -------   ...  ---- ..   ---- ----  .. ----- . -----  
none


 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 3: REFERENCE DEFINITIONS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

 ════ Subroutines ═══════════════════════  
  seg:off ..  type & options  ..   label     ..      comments  
  ------- ..  --------------   ..  -------------- --------------



 ════ Locations ═════════════════════════  
  seg:off ..  type & options  ..   label     ......      comments  
  ------- ..  --------------  ..   -------------- .. --------------



 ════ Data Items ════════════════════════  
  seg:off ..  type & options  ..   label     ......      comments  
  ------- ...  --------------  ..   -------------- .. --------------
2
  • Yes that is the generic structure of the file. I'm looking for the specific syntax for the DS data argument that is mentioned in the SAMPLE1.DEF. Commented Apr 15, 2014 at 9:54
  • I was able to find the SAMPLE1.DEF over at Textfiles. Looks like the syntax is DS for "data structure" but it does not list any examples of structs.
    – Igor Skochinsky
    Commented Apr 22, 2014 at 14:30
1

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:\>
1
  • I haven't been able to get back to this yet. I expect to be able to mark it answered in a week or so. Commented May 7, 2014 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.