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, AUTOSEGMENT=ON | |t2504 PROGRAM FORMAT=BIN,MODEL=TINY,WIDTH=16,LISTMAP=ON,LISTGLOBALS=OFF,IMAGEBASE=0 |[CODE] ::::Section changed. |0000:BF[1400] | MOV DI,Boss.born.month ; Referencing a member inside the object Boss. |0003:C7053131 | MOV [DI],"11",DATA=WORD ; Updating a member. | |;; |[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 | |;; |[Employee] |Employee STRUC ; Declaration of a complex structure. |0000:00000000000000000000000000000000 | .name D 16*B ; Definition of an ordinary member of the structure Employee. |0010:0000000000000000 | .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 | |;; Continue with definition of structure Employee. |[Employee] ::::Section changed. |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" | | ENDPROGRAM t2504 | **** ListMap "t2504.bin",model=TINY,groups=1,segments=2,entry=,stack=[COMGROUP]:0000FFFEh | [COMGROUP],FA=00000000h,VA=00000000h,size=00000058h=88,group [CODE] [DATA] | [CODE],FA=00000000h,VA=00000000h,size=00000007h=7,width=16,align=0010h,purpose=CODE | [DATA],FA=00000010h,VA=00000010h,size=00000048h=72,width=16,align=0010h,purpose=DATA
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=88. "t2504.htm"{88} I0650 Program "t2504" assembled in 3 passes with errorlevel 0. "t2504.htm"{88} I0750 Source "t2504" (121 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t2504.htm.lst" created, size=3267. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t2504. bin
0000: BF 24 00 C7 05 31 31 00 00 00 00 00 00 00 00 00  ¤$°¤·11°°°°°°°°°
0010: 54 6F 6E 79 20 42 6C 61 6E 69 6B 00 00 00 00 00  Tony¯Blanik°°°°°
0020: 31 39 38 30 00 00 00 00 32 30 31 36 31 32 30 31  1980°°°°20161201
0030: 50 72 61 67 75 65 00 00 00 00 00 00 00 00 00 00  Prague°°°°°°°°°°
0040: 57 65 6E 63 65 73 6C 61 76 20 53 71 75 61 72 65  Wenceslav¯Square
0050: 31 32 33 2F 34 00 00 00                          123/4°°°

▲Back to the top▲