A83: Re: very basic asm program help...


[Prev][Next][Index][Thread]

A83: Re: very basic asm program help...




I'm not sure but have a go at this
        ld hl,0000h            'NOTE: this can be replaced with
                                                    call _homeup or
something
                                                       like that.
        ld (CURROW),hl          'NOTE: if the abouve advise is right
                                                             then this can
be taken out
        ld hl,first
        call _puts
        ld hl, second
        call _puts
first:
        .db "Hey",0
second:
        .db "Hoz it hanging"

I'm pretty sure that it should work. If it dosn't then you'll have load in
the regesters. There is a better way to do this though
when setting the pointer, you can use this command

        ld hl, (curcol)*256+(currow)
        ld (currowl),hl

Just sustitute numbers instead of (curcol) and (curcol) in the first line
and the next line will magically put those numbers in currow and curcol.
Any way I hope I helped
From
                          ''~``
                        ( o o )
  ____.oooO__(_)__Oooo.____
 /  Steven Conway                         \
[                                                        ]
[   Conway@ssc.net.au                 ]
[  (   )                                                ]
 \__\ (____(   )______________/
       \_)        ) /
                 (_/



-----Original Message-----
From: JakeGuilbo <JakeGuilbo@aol.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Thursday, 12 March 1998 10:22
Subject: A83: very basic asm program help...


>
>hello....i am starting to learn asm and im moving very slowly..i need help
>with something...
>you know how the asm equivlent of basic's:
>
>Disp "Hey"
>
>is:
>        ld hl,0000h
>        ld (CURROW),hl
>        ld hl,first
>        call _puts
>first:
>        .db "Hey",0
>
>Is there anyway to do a:
>
>Disp "Hey","Howz it goin?"
>
>in asm without re-typing all the ld's?
>
>jake