Re: LZ: 3 ASM questions
[Prev][Next][Index][Thread]
Carl Wang wrote:
>
> OK, I've finally concluded that summer school pre-calc is boring (after 4
> weeks). So I've decided to write some asm programs (by hand) in class.
>
> 1) I've been able to make the basic playing field (just a bunch of boxes
> made by lines with Magnus's Plot point routine) and wait for enter to be
> pressed. I tried adding some text like this:
>
> [a bunch of lines being drawn}
>
> text:
> ld hl,$140A
> ld ($8333),hl
> ld hl, (PROGRAM_ADDR)
> ld de, words
> add hl,de
> ROM_CALL(D_ZM_STR)
> key:
> call GET_KEY
> cp $9
> ret z
> jr key
>
> words: .db "Press enter",0
>
> .end
>
> It compiles OK, but the text looks like garbage. My screen was set to
> graphics (ld a,4 then out (5),a) and everything else runs fine. I don't
> know what's wrong.try making the line that reads "ld hl, (PROGRAM_ADDR)" to say "ld hl,(PROGRAM_ADDR)" and the line that reads
"(ld de, words" to say "ld de,words". That should work but I'm not sure. Does anybody agree with my fix?
> 2) When do I need the $ in front of a number ($564A rather than 564A)?The "$" means that the number following the "$" symbol is going to be hex.
>
> 3) Let's say I have a picture-like thing stored as a bunch of .db $00
> etc. How would I display it, for example, at location y=20, x=10?
>
> Well, thanks for the help. I have a lot of time on my hands so if all
> goes well, I should have this out by the end of summer, or the end of
> October, or the end of the year...Look at the source code to nibbles(NIBBLES.ASM at TICALC.ORG in the compilable source code section) for that
one
>
> _ _ /--
> / \/ \/ -camels@juno.com
> -====== -formerly cwang@pacx.com
> || ||
References: