home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / vmsnet / internal / 1538 < prev    next >
Encoding:
Internet Message Format  |  1992-11-04  |  2.3 KB

  1. Path: sparky!uunet!news.univie.ac.at!chx400!ira.uka.de!sol.ctr.columbia.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32
  2. From: Hunter Goatley <goathunter@WKUVX1.BITNET>
  3. Newsgroups: vmsnet.internals
  4. Subject: RE: Assembler wishlist
  5. Message-ID: <00963201.025242E0.31458@WKUVX1.BITNET>
  6. Date: Wed, 04 Nov 1992 19:37:22 CST
  7. Organization: Macro32<==>Vmsnet.Internals Gateway
  8. X-Gateway-Source-Info: Mailing List
  9. Lines: 45
  10.  
  11. brydon@dsn.sinet.slb.com writes:
  12. >
  13. >>>        .dsect  x
  14. >>>flink:  .long
  15. >>>blink:  .long
  16. >>>data:   .blkl   n
  17. >>>bits:   .byte
  18. >>>...
  19. [...]
  20. >For the second case of "BLINK = 4", of course you can do this.  But it is the
  21. >programmer's responsibility to know that a longword is 4 bytes, and to get all
  22. >the offsets correct (trivial for this example, but a bit more hairy in a large
  23. >program).  This is largely a  clerical task that can and should be taken care
  24. >of by the assembler.  Also, a data type change of one variable in the middle
  25. >of your struct/dsect causes all following offset values to change.  This
  26. >currently has to be done manually, should be done by the assembler.
  27. >
  28. Not if you use the $DEFINI macro, found in SYS$LIBRARY:STARLET.MLB.
  29. Of course, $DEFINI does the .PSEC $ABS$ and the resetting of ".".  But
  30. it does it all transparently to the programmer (this is from my
  31. LOGIN.MAR):
  32.  
  33. ;
  34. ;  Define symbolic offsets for the 7 word array returned by the system service
  35. ;  $NUMTIM.
  36. ;
  37.         $DEFINI TIM                             ; Structure for $NUMTIM buffer
  38. $DEF    TIM_W_YEAR      .BLKW   1               ; 7 words:      Year
  39. $DEF    TIM_W_MONTH     .BLKW   1               ; ....          Month
  40. $DEF    TIM_W_DAY       .BLKW   1               ; ....          Day
  41. $DEF    TIM_W_HOUR      .BLKW   1               ; ....          Hour
  42. $DEF    TIM_W_MINUTE    .BLKW   1               ; ....          Minute
  43. $DEF    TIM_W_SECOND    .BLKW   1               ; ....          Second
  44. $DEF    TIM_W_HUNDRED   .BLKW   1               ; ....          Hundredths
  45.         $DEFEND TIM
  46.  
  47. Any of the .BLKx storage directives can be used; changing one in the
  48. middle automatically causes the others to change.
  49.  
  50. Unless I'm missing something, this should do what you want.
  51.  
  52. Hunter
  53. ------
  54. Hunter Goatley, VMS Systems Programmer, Western Kentucky University
  55. goathunter@WKUVX1.BITNET, 502-745-5251
  56.