1

Hello there,

I have a problem using .array statement in MADS assembler. I am still learning assembly language and I hope someone will help me. In particular, in my case, how can I show a string on the screen, which is declared as an array? I know I am doing something wrong using dta statement, which shows string address instead of an actual string. The solution will come handy when declaring new strings with the usage of the same declared array, eliminating the need for declaring new labels for any new strings.

Greetings to all Atarians,
Gury


org $3200

.array str1 10 .byte
[0]="Atari"
.enda

Main

jsr printf
dta c'%',$9b,0
dta a(str1)

jmp *

.link 'c:\atari\utils\mads\examples\libraries\stdio\lib\printf.obx'

run Main

2

printf

#    - string
@    - ATARI FLOAT
%    - WORD

' '              - ATASCII
" "             - INTERNAL

new mads accept .array without declared size

    org $2000

.array str1 .byte
    [0]='Atari',$9b
.enda

Main
    jsr printf
    dta c'#',$9b,0
    dta a(str1)

    jmp *

.link 'stdio\printf.obx'

    run main
*- TeBe/Madteam
3x Atari 130XE, SDX, CPU 65816, 2x VBXE, 2x IDE Plus rev. C

3

Tebe, thank you.