Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Most useful/needed stuff which should be added
#5
@Na_th_an:
Until a proper assembler version is available, I coded a sub which shows what I mean. It is maybe a little bit faster than PRINT, and puts a attribute too.
Found a problem:
a=peek(@linebuffer+y)<<5+16384+x displayed a wrong result, so I was forced to split it up.
scr=a<<5+x+16384 was not working correctly too. Usualy binary operation should have the highest priority, like multiplication, but only if I use braces, it calculates correctly.
Code:
sub putchar(x as Uinteger,y as Uinteger,adr as Uinteger)
    dim scr as Uinteger
    dim a as Uinteger
    a=peek(@linebuffer+y)
    scr=(a<<5)+x+16384
    poke ubyte scr,peek(adr)
    poke ubyte scr+256,peek(adr+1)
    poke ubyte scr+512,peek(adr+2)
    poke ubyte scr+768,peek(adr+3)
    poke ubyte scr+1024,peek(adr+4)
    poke ubyte scr+1280,peek(adr+5)
    poke ubyte scr+1536,peek(adr+6)
    poke ubyte scr+1792,peek(adr+7)
    poke ubyte 22528+x+(y<<5),peek (adr+8)
End sub

start:
dim x,y as ubyte
dim adr as Uinteger
adr=9
for y=0 to 23
    for x=0 to 31
        putchar(x,y,adr)
        adr=adr+9
    next x
next y
end

linebuffer:
asm
    defb 0,1,2,3,4,5,6,7,64,65,66,67,68,69,70,71,128,129,130,131,132,133,134,135
end asm
Another problem:
ASM
works
ASM ' Comment
does not work. (I know, this is because after ASM Command only ASM REM (Wink is accepted).
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)