?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.         STRUCT BLOCK_HEADER
  2. length      WORD    BLOCK_HEADER
  3. type        BYTE    $AB
  4. name        TEXT    10, { "none", 32, '!' } ; will produce "none !!!!!" default data
  5.                     ; because this is definition of the field, here last byte is "filler"
  6. datastart   WORD
  7. datalen     WORD
  8. checksum    BYTE    $CC
  9.         ENDS
  10.  
  11.         ORG  0x8000
  12. head1   BLOCK_HEADER {      ; Multi-line initialization requires curly braces.
  13.     , ,                     ; Keeping default length and type by specifying empty values.
  14.     { 'New',                ; The final `name` data will be "New Name!!"
  15.         32,                 ; overwriting only 8 bytes of default data.
  16.         "Name" },           ; The last "e" is NOT "filler" in the non-default value.
  17.         $8000, $1234        ; Explicit datastart and datalen values.
  18. }                           ; End of initial data block ("checksum" keeps default value).
  19.  
  20. ; machine code (struct data):
  21. ; 12 00 AB 4E 65 77 20 4E 61 6D 65 21 21 00 80 34 12 CC
  22. ; = { $0012, $AB, "New Name!!", $8000, $1234, $CC }
  23.