EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t2504: Pseudoinstruction STRUC declaration nested in another STRUC


Description
Declaration of a structure within another structure.
Tested procedures
PseudoSTRUC   PseudoENDSTRUC  
Source & expected listing t2504.htm.lst
| | EUROASM LIST=ON, DUMP=ON, DUMPWIDTH=42, DUMPALL=ON, NOWARN=2101..2102 | |t2504 PROGRAM FORMAT=BIN,MODEL=TINY,WIDTH=16,LISTMAP=OFF,LISTGLOBALS=OFF,IMAGEBASE=0 |[DATA] |[DATA] SEGMENT WIDTH=16, PURPOSE=DATA |[Date] |Date STRUC ; Standard declaration of a structure. |0000:........ | .year D 4*B |0004:.... | .month D 2*B |0006:.... | .day D 2*B |0008: | ENDSTRUC Date |[DATA] ::::Section changed. |0000: | |[Employee] |Employee STRUC ; Declaration of a complex structure. |0000:................................ | .name D 16*B ; Definition of an ordinary member of the structure Employee. |0010:................ | .born D Date ; Definition of a structured member. |0018:3230313600000000 | .hired D Date, .year="2016" ; Hiring year defaults to "2016". |[Employee.PostalAddr] | .PostalAddr STRUC ; Declaration of a structure within parent structure. |0000:................................ | .city D 16*B |0010:................................ | .street D 16*B |0020:................ | .number D 8*B |0028: | ENDSTRUC .PostalAddr |[Employee] ::::Section changed. |0020: | ; Continue with definition of structure Employee. |0020:5072616775650000000000000000000000 | .address D .PostalAddr, .city="Prague" ; A structured member with default city. |0031:0000000000000000000000000000000000 ----Dumping all. |0042:000000000000 ----Dumping all. |0048: | ENDSTRUC Employee |[DATA] |[DATA] |0000: | ; Definition of one Employee record. |0000:546F6E7920426C616E696B000000000031 |Boss D Employee, .name="Tony Blanik", \ |0011:3938300000000032303136313230315072 | .born.year="1980", .hired.day="01", .hired.month="12", \ |0022:616775650000000000000000000057656E | \ Remark: .address.city is left to default ("Prague"). |0033:6365736C6176205371756172653132332F | .address.street="Wenceslav Square", \ |0044:34000000 | .address.number="123/4" |[CODE] |[CODE] SEGMENT |0000:BF[1400] | MOV DI,Boss.born.month ; Referencing a member inside object Boss. |0003:C7053131 | MOV [DI],"11",DATA=WORD ; Updating a member. | | ENDPROGRAM t2504
Expected messages t2504.out
I0180 Assembling source file "t2504.htm". I0270 Assembling source "t2504". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t2504". "t2504.htm"{55} I0510 Assembling program pass 1. "t2504.htm"{55} I0510 Assembling program pass 2. "t2504.htm"{55} I0530 Assembling program pass 3 - final. "t2504.htm"{55} I0660 16bit TINY BIN file "t2504.bin" created, size=87. "t2504.htm"{89} I0650 Program "t2504" assembled in 3 passes with errorlevel 0. "t2504.htm"{89} I0750 Source "t2504" (118 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t2504.htm.lst" created, size=2964. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t2504. bin
0000: 54 6F 6E 79 20 42 6C 61 6E 69 6B 00 00 00 00 00  Tony¯Blanik°°°°°
0010: 31 39 38 30 00 00 00 00 32 30 31 36 31 32 30 31  1980°°°°20161201
0020: 50 72 61 67 75 65 00 00 00 00 00 00 00 00 00 00  Prague°°°°°°°°°°
0030: 57 65 6E 63 65 73 6C 61 76 20 53 71 75 61 72 65  Wenceslav¯Square
0040: 31 32 33 2F 34 00 00 00 00 00 00 00 00 00 00 00  123/4°°°°°°°°°°°
0050: BF 14 00 C7 05 31 31                             ¤·°¤·11

▲Back to the top▲