?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     STRUCT S_SymbOS_icon_header
  2. type        BYTE    2
  3. sizex       BYTE    8
  4. sizey       BYTE    8
  5.     ENDS
  6.  
  7.     STRUCT S_SymbOS_exe_header
  8. codelen     WORD                ;Length of the code area (OS will place this area everywhere)
  9. datalen     WORD                ;Length of the data area (screen manager data; OS will place this area inside a 16k block of one 64K bank)
  10. tranlen     WORD                ;Length of the transfer area (stack, message buffer, desktop manager data; placed between #c000 and #ffff of a 64K bank)
  11. datadr:
  12. origin      WORD                ;Original origin of the assembler code      ; POST address data area
  13. trnadr:
  14. relcount    WORD                ;Number of entries in the relocator table   ; POST address transfer area
  15. prztab:
  16. stacksize   WORD                ;Length of the stack in bytes               ; POST table processes or timer IDs (4*1)
  17.             BLOCK   2, 0        ;*reserved* (2 bytes)
  18. bnknum      BLOCK   1, 0        ;*reserved* (1 byte)                        ; POST 64K ram bank (1-8), where the application is located
  19. name        TEXT    25          ;program name (24+1[0] chars)
  20. flags       BYTE                ;flags (+1=16colour icon available)
  21. icon16      WORD                ;file offset of 16colour icon
  22.             BLOCK   5, 0        ;*reserved* (5 bytes)
  23. memtab:                         ;"SymExe10" SymbOS executable file identification ; POST table reserved memory areas
  24. identifier  TEXT    8, { "SymExe10" }
  25. codex       WORD                ;additional memory for code area (will be reserved directly behind the loaded code area)
  26. datex       WORD                ;additional memory for data area (see above)
  27. trnex       WORD                ;additional memory for transfer area (see above)
  28.             BLOCK   26, 0       ;*reserviert* (26 bytes)
  29. appId:
  30. osver       WORD                ;required OS version (1.0)
  31.         ;Application icon (small version), 8x8 pixel, SymbOS graphic format
  32. iconsm      S_SymbOS_icon_header { 2, 8, 8 }
  33. icobsmdat   TEXT    16
  34.         ;Application icon (big version), 24x24 pixel, SymbOS graphic format
  35. iconbg      S_SymbOS_icon_header { 6, 24, 24 }
  36. icobbgdat   TEXT    144
  37.  
  38.     ENDS
  39.  
  40.     ASSERT 256 == S_SymbOS_exe_header
  41.     ASSERT 6 == S_SymbOS_exe_header.datadr
  42.     ASSERT 8 == S_SymbOS_exe_header.trnadr
  43.     ASSERT 10 == S_SymbOS_exe_header.prztab
  44.     ASSERT 14 == S_SymbOS_exe_header.bnknum
  45.  
  46. ;additional memory areas; 8 memory areas can be registered here, each entry consists of 5 bytes
  47. ;00  1B  Ram bank number (1-8; if 0, the entry will be ignored)
  48. ;01  1W  Address
  49. ;03  1W  Length
  50.     ASSERT 48 == S_SymbOS_exe_header.memtab
  51.  
  52. ;Application ID
  53.     ASSERT 88 == S_SymbOS_exe_header.appId
  54.  
  55. ;Main process ID is at (S_SymbOS_exe_header.appId+1) (offset 89), but it is not easy
  56. ;to create such label if "osver" is WORD type, that would need "union"-like feature
  57. ;that's unlikely to happen, it's more reasonable to define osver as two bytes then.
  58.  
  59.     OUTPUT "multi_line_initializer.bin"
  60.     ORG     #1000
  61.  
  62. exeHeader   S_SymbOS_exe_header {
  63.     #1234                   ; implicit delimiter at end (newline) (new line is next value)
  64.     #2345,                  ; explicit delimiter (comma) is valid only *AFTER* value
  65.     #3456
  66.     #1011
  67.     #0203                   ; relocate_count
  68.     #0405                   ; stack size
  69.     { "MyName" }            ; name
  70.     #AA, #ACAB,             ; flags, 16col icon offset
  71.     ,                       ; keep default identifier
  72.     #0102, #0304, #0506     ; code/data/transfer extra memory
  73.     #0708                   ; OS ver
  74.  
  75.     ; small icon
  76.     ,                       ; type + size sub-structure (default values)
  77.  
  78.     {
  79.  
  80.         #31,#F5,#23,#3F,#56,#6E,#47,#6E,#8F,#EA,#FF,#AE,#74,#E2,#77,#EE
  81.  
  82.     }
  83.  
  84.     ; big icon (144 bytes of data)
  85.     {}, {
  86.         #00,#00,#D0,#B0,#60,#C0,#00,#10,#60,#D0,#B0,#60,#00,#31,#F6,#FD,
  87.         #FB,#F4,#00,#31,#FF,#FF,#FF,#FC,#00,#73,#FF,#FF,#FF,#FA,#00,#73,
  88.         #FF,#FF,#FF,#FA,#00,#F7,#F0,#F0,#F7,#B6,#00,#F7,#FF,#FF,#FF,#F6,
  89.         #10,#FE,#F0,#F0,#FE,#3E,#10,#FF,#FF,#FF,#FE,#3E,#31,#FF,#FF,#FF,
  90.         #FD,#FE,#31,#FF,#FF,#FF,#ED,#3A,#73,#FF,#FF,#FF,#CB,#3A,#73,#FF,
  91.         #FF,#FF,#FB,#FE,#F7,#FF,#FF,#FF,#87,#32,#F7,#FF,#FF,#FF,#87,#32,
  92.         #70,#F0,#F0,#F0,#FF,#FE,#00,#21,#0F,#0F,#0E,#32,#00,#21,#0F,#0F,
  93.         #0E,#32,#00,#31,#FF,#FF,#FF,#FE,#00,#21,#0F,#0F,#0C,#32,#00,#20,#00,#00,#00,#76,#00,#10,#FF,#FF,#FF,#EC,#00,#00,#F0,#F0,#F0,#C0
  94.     }
  95.  
  96.  
  97.  
  98.     ; these empty lines before final "}" are intentional
  99.  
  100. }
  101.         daa     ; first line after multi-line struct init (make sure it gets into listing!)
  102.  
  103. test2   S_SymbOS_icon_header {
  104.     1,
  105.     2, 3
  106. }
  107.  
  108.     STRUCT S_test3
  109. b1  byte    'b'
  110. icon    S_SymbOS_icon_header {
  111.     4,
  112.     5, 6
  113. }
  114. b2  byte    'e'
  115.     ENDS
  116.  
  117. test3a  S_test3
  118.  
  119. test3b  S_test3 {
  120.     'B',
  121.     { 7,
  122.         8, 9 },
  123.     'E'
  124. }
  125.  
  126.     STRUCT S_test4
  127. icon    S_SymbOS_icon_header {
  128.     10,
  129.     11, 12
  130. }
  131.     ENDS
  132.  
  133. test4a  S_test4
  134.  
  135. test4b  S_test4 {
  136.     { 13,
  137.         14, 15 }
  138. }
  139.  
  140.     OUTEND
  141.  
  142. test4err    S_SymbOS_icon_header {
  143.     1,,, ; missing }
  144.