Re: A83: Program creation <--- For Ian Graf.


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

Re: A83: Program creation <--- For Ian Graf.




the strangest thing happened. i know i sent this message to the list,
it's even in the archive, but it wasn't in the digest when i received
it. so just to make sure everyone got it i'm sending it again.


> 
> 1) ldir stands for
> 
> ld: load
> i: increment
> r: and repeat
> 
> what this does is copies the byte hl points to, to the byte de points
> to, and decrements bc. then it increments both de and hl and repeats
> this process untill bc=0 (remember at each pass it decrements bc)
> 
> so if you wanted to copy a pic you made with pic83 this is what you
> would do:
> 
>      ld hl,pic          ; where to copy from- points to the pic data
>      ld de,plotsscreen  ; where to copy to- points to the graph buffer
>      ld bc,768          ; the number of bytes to copy-
>                         ; 12 bytes per row x 64 rows = 768 bytes
>      ldir               ; now copy, byte by byte
> 
> 2) the "prgm" token (in hex) is 5F. in order to add it to your program
> do this:
> 
>      .db $5F,"IAN"
> 
> that would be prgmIAN
> 
> 3) the data for the program you wanted to make would be this
> 
>      .db tLbl,"1",tEnter
>      .db tDisp,tString,"IAN MAKES GREAT PROGRAMS",tEnter
>      .db tPause,tEnter
>      .db tGoto,"1"
> 
>      ; :Lbl 1
>      ; :Disp "IAN MAKES GREAT PROGRAMS
>      ; :Pause
>      ; :Goto 1
> 
> the only thing i had to change was the message. as you probaly noticed
> they are all caps. in basic it is the biggest pain in the ass to use
> lower case because they have to be 2 byte tokens, and there isn't
> actually a character for every letter. to answer your question of how to
> start a new line that is what "tEnter" does.
> 
> one thing to always remember is when you create the program, make sure
> it is as long as the data you going to be copying to it. for example the
> program in number 3 would be 34 bytes long.


References: