TGB1718 Posted November 30, 2021 Share Posted November 30, 2021 I'm trying to create several structures in MADS and it's driving me mad I'm using the doc's and created the following. It seem happy with the .STRUCT declaration and the data initialisation, the problem is when I try to use the structure as shown at the bottom, I get the error:Description Undeclared macro COL1 (BANK=0) city.asm /City line 536 Problem I can't seem to get this working, am I missing something ? .STRUCT COLS addr1 .word mask1 .byte addr2 .word mask2 .byte .ENDS col1 DTA COLS[14] \ (12532,3,12580,243) \ (12676,3,12724,243) \ (12820,3,12868,243) \ (12964,3,13012,243) \ (13108,3,13156,243) \ (13252,3,13300,243) \ (13396,3,13444,243) \ (13540,3,13588,243) \ (13684,3,13732,243) \ (13828,3,13876,243) \ (13972,3,14020,243) \ (14116,3,14164,243) \ (14260,3,14308,243) \ (14404,3,14452,243) \ (14548,3,14596,243) lda col1[0].mask2 Quote Link to comment Share on other sites More sharing options...
ilmenit Posted November 30, 2021 Share Posted November 30, 2021 7 minutes ago, TGB1718 said: I'm trying to create several structures in MADS and it's driving me mad I'm using the doc's and created the following. It seem happy with the .STRUCT declaration and the data initialisation, the problem is when I try to use the structure as shown at the bottom, I get the error:Description Undeclared macro COL1 (BANK=0) city.asm /City line 536 Problem After adding org it compiles for me: .STRUCT COLS addr1 .word mask1 .byte addr2 .word mask2 .byte .ENDS org $2000 col1 DTA COLS[14] \ (12532,3,12580,243) \ (12676,3,12724,243) \ (12820,3,12868,243) \ (12964,3,13012,243) \ (13108,3,13156,243) \ (13252,3,13300,243) \ (13396,3,13444,243) \ (13540,3,13588,243) \ (13684,3,13732,243) \ (13828,3,13876,243) \ (13972,3,14020,243) \ (14116,3,14164,243) \ (14260,3,14308,243) \ (14404,3,14452,243) \ (14548,3,14596,243) lda col1[0].mask2 Writing object file... 27 lines of source assembled in 3 pass 99 bytes written to the object file Maybe you have problem somewhere else...? Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted November 30, 2021 Author Share Posted November 30, 2021 (edited) @ilmenit thanks, will check , I thought it did look ok Error was a bit of a "red herring", I was creating several of those structures and created that one first so there were other errors as I hadn't completes the coding, just strange it pick that one as the error even though there was nothing wrong. I created the rest of the structures and it compiles fine, thanks for your help Edited November 30, 2021 by TGB1718 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.