ok I d/l'ed masm and read a whole slew of tutorials, I've even managed to write some really basic output-text stuff. Recently I modified the LCD cd played example. I stripped out all the cd stuff, patched in some mcisendstring stuff from some source someone posted on some site (for playing mp3's), and I managed to get some text to scroll fro left to right (eventually going off the window and out of site until it loops back to the begining of the string.. So I'm making really good progress.. But I have a problem with part of my code that I been trying to fix for about 3 days now  :cry: :cry: :cry:  I been trying to apply what I've learned from the many tutorials on Mov and variables and arrays in assembly to my problem here, but the problem is the major lack of standards amongst the compilers *sigh*  For reference I'm using masm 6.14.8444    If you think it may work on the newer version 8 one, let me know and I'll happily send it to you to test it

I decided I wanted to try to make the text simulate a sine-wave with each letter going up and down independantly but in synch with each other, with the sine-wave being a maximum of +4 and -4 from the starting y coord of (300), so this means every 4 letters (since each letter moves up 1 whoule pixel every 1 step) it has to start from the begining of an array I made of positions (initialized all to 0) and bump the position offset up by 1 (by setting the position table element to the next higher value in the array of offsets [0,1,2,3,4,3,2,1,0,-1,-2,-3,-4,-3,-2,-1]
if none of that made sense basically here is the psuedo-code of what I want to do


  • define an array of offsets called TextPosOffsetMatrix (and as a db data type??)

  • set the value of the elements to 0,1,2,3,4,3,2,1,0,-1,-2,-3,-4,-3,-2,-1  *each element seperated by a comma

  • define another array that contains the actual positions of each of the 44 lettesr and call this array TextPositionTable, declare it as (a byte??) and set the elements to 01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,
    01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,
    01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h,01h

  • declare a db variable called TextCounter initialize it to 0 and do the same for TempVariable

  • As the program is already scanning each letter at a time (adding 1 to textcounter each loop through) for the lcd effect, set the Y-coordinate(variable called dwY) for the
    output of the character t, to the proper y value (to simulate a sine-wave just) just before the procedure to draw the character is called

  • Because we have from 0 to -1 in our offset matrix, we know that every 16 loops through we need to reset the
    element index variable that were using which is (now) cl, (used to be TempVariable, changed it to a register in hopes it was just the compiler did not like me not working with a register instead of a variable)

  • through each loop after the offset index has been increased put the element's value into the TextPositionTable(TextCounter)

  • call the drawcharacter function and supply the y coordinate paramater dwY + (the position of the element in TextPositionTable cooresponding to TextCounter  * (Using the rules of algebra to our advantage we know this works because + and - equals  a -,  and + and + equals a +, so we don't have to bother with any special routines to for neg or positive since our offset matrix builds that in for us)



ok now for the code I came up with (declarations removed in an attempt to keep an already long post from getting longer

                        mov cl, 00h
                        mov TextCounter, 00h
                        .WHILE TextCounter < esi
                            inc TextCounter
                            mov bl, TextCounter
                            inc cl
                            .IF cl> 16
                                mov cl, 01
                                mov al,TextPosOffsetMatrix+bl
                                mov TextPositionTable,
                            .ENDIF
                        .ENDW




  • Why does the above code produce the error:
    c:\masm32\src\demo1\Demo1.asm(755) : error A2032: invalid use of register
    c:\masm32\src\demo1\Demo1.asm(756) : error A2031: must be index or base register
    c:\masm32\src\demo1\Demo1.asm(757) : error A2070: invalid instruction operands
  • What's the difference between db and BYTE?

  • Why can I not use db inside a procedure?



Please keep in mind if some of the code is really way off it's prolly because I been fighting this problem for about 3 days now, and is the result of change after change after change after change after change trying to get it to work
Posted on 2005-09-23 00:13:13 by EtErNiTy
1.some registers can be used in hll-constructions, like while or invoke, it is possible of usage of cx
2.if you are using register as pointer you should use register of same scale as your addressing mode: if there is 16 bit, you should use "bx" etc., if mode is 32-bit, you should use "ebx" - never "bl"
3.not all registers can be used as indexing in 16-bit mode, only bx,di,si and bp (i did not understand mode from your part of source, it seems you are using 32-bit because of esi)
Posted on 2005-09-23 00:22:45 by Shoo
holy s#*t dude that's huge... I didn't know that about the while stuff and the restrictions on registers for indexing... I guess my next attempt will prolly be pushing registers onto the stack to free some temporary storage up, and then popping them back off.. I'll let ya know how I made out. Thanks for the fast reply! :)
Posted on 2005-09-23 01:25:20 by EtErNiTy
advise: use fasm  ;)
Posted on 2005-09-23 03:37:27 by Shoo
interesting... never even heard of fasm... I've heard of nasm. Reason I shy'ed away from nasm is it was open source and I figured it probably was like in beta stages or something, but reading some of the wikipedia info on fasm it sounds like the little compiler that could. The fact it's cross-platform earns at least a fair shot by me.. That's one of the big things I did not like about masm, is spending the time to learn how the compiler behaves and acts all the while knowing it's not cross platform.. That advice you gave on the register stuff btw worked like a charm! :)  Problem comes in now, is that I get a windows xp equivalent of the 98 close-and-details box, making it now harder to debug.. My new code looks like this


                        push edx
                        push eax
                       
                        mov ecx, 0
                        mov TextCounter, 0
                        .WHILE TextCounter < esi
                            add TextCounter,1
                            inc ecx
                            .IF ecx > 16
                                mov eax, dword ptr
                                ; Correct Line - Remmed to fiddle with an experiemental line in hope to remove crash
                                ;mov , eax

                                mov TextPositionTable+ecx, dword ptr
                                mov ecx, 1
                            .ENDIF
                        .ENDW
                        mov esi, dword ptr
                        pop eax
                        pop edx
                        invoke DrawSmallChar, edx, dwY+, eax ;draw one small char

It seems like it's on  the invoke line at least according to w32dsm89.. Thinking I might wanna run it through olydbg and see what that comes up with.. Anyhow thanks for the advice on fasm, I'm definately gonna look into it! :)
Posted on 2005-09-23 08:12:39 by EtErNiTy
I am impressed by your code


                                mov TextPositionTable+ecx, dword ptr


Will surely fail in any assembler. You can't use mov to move data from memory to memory. Such a opcode does not exist.

Personally I would recommend you to not use .while or .if Learn the conditional jump and it would give you insights and probably better looking code.

PS: I moved your thread to the correct location (aka forum).
Posted on 2005-09-23 08:42:08 by roticv
by fail do you mean it'll crash when the app is ran or by fail do you mean it won't even compile? 'Cause it compiles just fine


EDIT: nm I took it out of the hll consutrctions and it came back with an error... last time I use those things... for those that are starting out and wanted to know what the end code looked like to fix it, here it is:


                      push edx
                        push eax
                       
                        mov ecx, 0
                        mov TextCounter, 0
                        jmp @SineCharacters
                 
.ELSEIF dwSize==LCDTEXTSIZE_BIG
               
.ENDIF

            @SineCharacters:
                            add TextCounter, 1
                            cmp TextCounter, esi
                            jne @notfinished
                            je @OutputText           

            @notfinished:
                        inc ecx
                        cmp ecx, 17
                        je @resetoffset
                        jne @dontresetoffset
                                                   
                        @resetoffset:
                                    mov eax, dword ptr
                                    ; Correct Line
                                    mov , eax
                                    mov ecx, 1

                                    mov esi, dword ptr
                                    pop eax
                                    pop edx
                                    jmp @OutputText
                        @dontresetoffset:
                                    mov eax, dword ptr
                                    ; Correct Line
                                    mov , eax

                                    mov esi, dword ptr
                                    pop eax
                                    pop edx
                                    jmp @SineCharacters
.ENDW
            @OutputText:
                        pop ecx
                        pop eax
                        invoke DrawSmallChar, edx, dwY+, eax ;draw one small char

      @nextchar:
    .IF dwSize==LCDTEXTSIZE_SMALL
            add edi, 8 ;small char takes 8 pixels
    .ELSEIF dwSize==LCDTEXTSIZE_BIG
            add edi, 22 ;big char takes 22 pixels
    .ENDIF


Only problem is I'm loosing my text somewhere in that mess.. Well at least it runs now, before it'd run but just crash

And yeah I know there are still some hll-constructions in use.. It's because the original example I started with had them all over, and it's gonna take time now to convert it over..
Posted on 2005-09-23 10:42:11 by EtErNiTy
He means it'll crash when you run it. Either do:


mov ebx, dword ptr
mov TextPositionTable+ecx, ebx


or


push dword ptr
pop TextPositionTable+ecx


The first trashes EBX but I prefer that method. The second uses the stack rather than registers.
It's really up to you.

Shoo,
Btw, nice to see ya again mate :)

Regards,
Bryant Keller
Posted on 2005-09-23 16:15:42 by Synfire
*sigh* this is starting to feel like the problem that never goes away

I took out all of the HLL constructions, it's horrible and  monterious looking. I'm not happy at all with it but to humour the possibility that the probem is stem'ed from specific registers being used inside the hll blocks, I had to remove them. Here it is

Original LCD CD Player code:
;===============================================================================
; LCD CD Player - (C) 2000 by Thomas Bleeker . http://exagone.cjb.net
;===============================================================================



DrawLCDText proc uses esi edi ebx dwX:DWORD, dwY:DWORD, dwSize:DWORD, lpText:DWORD

; This procedure reads a null-terminated string character for character and
; looks each char up in the LCDChars table. When found, it displays the character
; and proceeds to the next. dwX and dwY are the start coordinates (left-top).
; dwSize can be LCDTEXTSIZE_SMALL or LCDTEXTSIZE_BIG (small or big characters).
; lpText is the pointer to the string.

      mov        TextCounter, 1
      mov        TempVariable, 1
      mov        ecx, 1
mov esi, lpText
xor edi, edi
;.WHILE TRUE
      jmp @CharacterLoop

      @CharacterLoop:
; get one char:
xor eax, eax
mov al,
inc esi

; stop if 0 terminator found:
test al, 0
            je @ExitProcedure
           
; --- Map character into LCDChars (ascii -> LCDChars index) ---
            test        al, 30h
            jnz @al_number
            test        al, 31h
            jnz @al_number
            test        al, 32h
            jnz @al_number
            test        al, 33h
            jnz @al_number
            test        al, 34h
            jnz @al_number
            test        al, 35h
            jnz @al_number
            test        al, 36h
            jnz @al_number
            test        al, 37h
            jnz @al_number
            test        al, 38h
            jnz @al_number
            test        al, 39h
            jnz @al_number

            test        al, 41h
            jnz @al_upperletter
            test        al, 42h
            jnz @al_upperletter
            test        al, 43h
            jnz @al_upperletter
            test        al, 44h
            jnz @al_upperletter
            test        al, 45h
            jnz @al_upperletter
            test        al, 46h
            jnz @al_upperletter
            test        al, 47h
            jnz @al_upperletter
            test        al, 48h
            jnz @al_upperletter
            test        al, 49h
            jnz @al_upperletter
            test        al, 4Ah
            jnz @al_upperletter
            test        al, 4Bh
            jnz @al_upperletter
            test        al, 4Ch
            jnz @al_upperletter
            test        al, 4Dh
            jnz @al_upperletter
            test        al, 4Eh
            jnz @al_upperletter
            test        al, 4Fh
            jnz @al_upperletter
            test        al, 50h
            jnz @al_upperletter
            test        al, 51h
            jnz @al_upperletter
            test        al, 52h
            jnz @al_upperletter
            test        al, 53h
            jnz @al_upperletter
            test        al, 54h
            jnz @al_upperletter
            test        al, 55h
            jnz @al_upperletter
            test        al, 56h
            jnz @al_upperletter
            test        al, 57h
            jnz @al_upperletter
            test        al, 58h
            jnz @al_upperletter
            test        al, 59h
            jnz @al_upperletter
            test        al, 5Ah
            jnz @al_upperletter
            test        al, 61h
            jnz @al_lowerletter
            test        al, 62h
            jnz @al_lowerletter
            test        al, 63h
            jnz @al_lowerletter
            test        al, 64h
            jnz @al_lowerletter
            test        al, 65h
            jnz @al_lowerletter
            test        al, 66h
            jnz @al_lowerletter
            test        al, 67h
            jnz @al_lowerletter
            test        al, 68h
            jnz @al_lowerletter
            test        al, 69h
            jnz @al_lowerletter
            test        al, 6Ah
            jnz @al_lowerletter
            test        al, 6Bh
            jnz @al_lowerletter
            test        al, 6Ch
            jnz @al_lowerletter
            test        al, 6Dh
            jnz @al_lowerletter
            test        al, 6Eh
            jnz @al_lowerletter
            test        al, 6Fh
            jnz @al_lowerletter
            test        al, 70h
            jnz @al_lowerletter
            test        al, 71h
            jnz @al_lowerletter
            test        al, 72h
            jnz @al_lowerletter
            test        al, 73h
            jnz @al_lowerletter
            test        al, 74h
            jnz @al_lowerletter
            test        al, 75h
            jnz @al_lowerletter
            test        al, 76h
            jnz @al_lowerletter
            test        al, 77h
            jnz @al_lowerletter
            test        al, 78h
            jnz @al_lowerletter
            test        al, 79h
            jnz @al_lowerletter
            test        al, 7Ah
            jnz @al_lowerletter
            test        al, 2Eh ; .
            jnz @al_period
test        al, 2Ch ; ,
            jnz @al_comma
test        al, 3Ah ; :
            jnz @al_colon
test        al, 28h ; (
            jnz @al_leftparen
test        al, 29h ; )
            jnz @al_rightparen
test        al, 3Dh ; =
            jnz @al_equals
test        al, 2Dh ; -
            jnz @al_minus
;test        al, A9h ; ©
            ;jnz @al_copyright
test        al, 20h ; " "
            jnz @al_space
jmp @nextchar ; else...

            @al_number:
                    sub al, "0"
                    jmp @contchar_routine
            @al_upperletter:
                    sub al, ("A"-10)
                    jmp @contchar_routine
  @al_lowerletter:
  sub al, ("a"-10)
                    jmp @contchar_routine
            @al_period:
                    mov al, 36
                    jmp @contchar_routine
            @al_comma:
                    mov al, 37
                    jmp @contchar_routine
            @al_colon:
                    mov al, 38
                    jmp @contchar_routine
            @al_leftparen:
                    mov al, 39
                    jmp @contchar_routine
            @al_rightparen:
                    mov al, 40
                    jmp @contchar_routine
            @al_equals:
                    mov al, 41
                    jmp @contchar_routine
            @al_minus:
                    mov al, 42
                    jmp @contchar_routine
            @al_copyright:
                    mov al, 43
                    jmp @contchar_routine
            @al_space:
                    jmp @nextchar;

            @contchar_routine:

                  ; --- draw char ---
                  mov edx, dwX
                  add edx, edi
                              test        dwSize, LCDTEXTSIZE_SMALL
                              je        @PreSineCharacters
                              jne        @PreSineCharacters ;Eventually we'll have another routine setup for large text
                             
                              @PreSineCharacters:
                                                mov TextCounter, 0
                                                jmp @SineCharacters
                              @SineCharacters:
                                              push ecx;
                                              mov ecx, 0
                                             
                                              add TextCounter, 1
                                              test TextCounter, esi
                                              jne @notfinished
                                              je @OutputText           
                 
                              @notfinished:
                                          inc ecx
                                          test ecx, 17
                                          je @resetoffset
                                          jne @Step2
                                                                     
                                          @resetoffset:
                                                      mov ecx, 1
                                                      jmp @Step2
                                          @Step2:
                                                      push eax
                                                      mov eax, dword ptr
                                                      mov , eax
                                                      mov esi, eax
                                                     
                                                      pop eax
                                                     
                                                      jmp @OutputText
                              @OutputText:
                                          pop ecx
                                          invoke DrawSmallChar, edx, dwY+, eax ;draw one small char

                              @nextchar:
                                        test    dwSize, LCDTEXTSIZE_SMALL
                                        je @SetSmallText
                                        jne @SetBigText
                                       
                                        @SetSmallText:
                                                      add edi, 8    ;small char takes 8 pixels
                                        @SetBigText:
                                                      add edi, 22  ;big char takes 22 pixels
;.ENDW
      test eax, 0
      je @ExitProcedure
      jne @CharacterLoop

      @ExitProcedure:
                    ret
ret
DrawLCDText endp


produces an XP generated an error box, (98 equivalent of a close and details). It's pretty sure it's got something to do with I'm using an opcode incorrectly (like before moving memory to memory), but I think to spot that kind of thing it's above my ability (at least for now). Another quick question I have, is there a tutorial on labels that I can read up on? I'm still not 100% certain on how they behave.. if a label is right after a set of text, does it automatically jump into it do do I need to jmp into it even though it's the next line in the source? and does a ret return to the calling procedure or can you use that to return to the very next line of the calling label-block?
My guess is, si these 2 questions are heavily compiler dependant and vary from compiler to compiler...

EDIT: nm I did a little reading on the cmp and test functions, I had remember that they do the same thing but arrive differently.. I realized
I tested if something was not equal while using a cmp changing the cmp to test fixed it. Syntaxually it was correct, but logically it wasn't

EDIT2: nm again.. I had it right the first time, only reason it didn't crash when I made the cmp tests is because nothing tested positive and performed because it was working off the wrong flag bit
My questions on labels still exist though (at least until I find the answer, I supposed I could write another program to test it...
Posted on 2005-09-23 23:01:42 by EtErNiTy
Wow that's hard work man.

You could have shortened the code into to conditional jumps for to test whether they are number, two conditional jumps to test whether they are lowercase and 2 conditional jumps to test whether they are upper case. You can read this if you have the time. http://www.asmcommunity.net/board/index.php?topic=4419.0

OKay, I really thought the line above I stated would not pass masm, but apparently it did. So I was wrong, but I am really interested to use the opcodes generated for that line. One more thing, test is different from cmp. I think you should basically use cmp most of the time, unless you know what you are doing. For example test eax, 1 is not the same as cmp eax,1 but test eax, eax is the same as cmp eax, 0. Basically cmp does substraction but does not update the registers, it just updates the EFLAG while for test bitwise and is done, but registers are not updated, only EFLAG.

In your posted code, I think you are using test wrongly.
Posted on 2005-09-24 08:03:58 by roticv
It acctually wasn't too bad, it's one of those things where I'm determined to get it to work no matter what, but this ongoing problem is pretty discouraging towards my view of eventually getting the hang on which registers are specifically for what and what the brackets mean (since mov'ing a variable without brackets into a register, seems to move the contents into the register, I think that's because of masm though.. I need too lose this compiler...)  Anyhow at best I can get this thing to compile and run, but no text comes shows up in the window.. Here's what I got it down too


WndProc proc uses ebx hWnd:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD
<blah blah>
.ELSEIF eax==WM_TIMER
; --- display update timer ---
.IF    wParam==MAINTIMERID
            add tSmallTextCounter, 1
                            cmp tSmallTextCounter, 45
                            jne @InvalidateWindow
                            mov tSmallTextCounter, 1
                            jmp @InvalidateWindow
           
                           @InvalidateWindow:
                       ; Invalidate the window to force a repaint
                       invoke InvalidateRect, hWnd, NULL, FALSE
.ENDIF

<blahblah>
.ELSEIF eax==WM_PAINT
; Start painting:
invoke BeginPaint, hWnd, ADDR ps
mov hDC, eax

; Draw the LCD on the backbuffer:
invoke DrawLCD

; Draw the backbuffer onto the main window:
                invoke BitBlt, hDC,0,0,+WindowWidthSizeOffset, +WindowHeightSizeOffset, hBackDC, 0,0, SRCCOPY

; Stop painting:
invoke EndPaint, hWnd, ADDR ps
.ELSE
invoke DefWindowProc, hWnd, uMsg, wParam, lParam
.ENDIF

<blahblah>

DrawLCD proc uses edi esi ebx
LOCAL   hDC:DWORD
LOCAL   CharacterCounter:DWORD
LOCAL   SubCharacterCounter: DWORD

; Get DC of main window to create compatible DCs:
invoke GetDC, hwnd
mov hDC, eax


      ; --- draw background ---
      ; The background is drawn by randomly drawing pixels with color
      ; indexes 0-6. Note that this is done every time the LCD is drawn.
      ; But because of the fixed randomseed used, the (pseudo)random
      ; function will always draw the same pixels and thus always keeping
      ; the background the same.
      mov         RandSeed, RANDOMSEED
      xor          ebx, ebx

     mov         ecx, lpLCDBmp ;ecx points to raw bitmap data
     xor          edi, edi
      .WHILE             edi<+WindowHeightSizeOffset
             xor esi, esi

                             .WHILE    esi<+WindowWidthSizeOffset
      invoke PseudoRandom
      mov , al    ;add random pixel
      inc      ebx
      inc      esi
                             .ENDW
             inc edi
       .ENDW

push ecx
mov ecx, 0        ;Prime the loop
jmp @UpdateCharacters

@UpdateCharacters:
                  ;This is where the positions of each character are updated from 1 to
                                                                                       ;tSmallTextCounter
                  inc ecx
                  cmp ecx, tSmallTextCounter
                  je @UpdateComplete
                  mov       EAX, TextElementIndex              ;Bounds-Check the index-pointer
                                                                                     ;array element
                  inc         EAX                                   ;Increase the element value by 1
                  cmp       EAX, 17                              ;Does it exceed 16?
                  je          @SetElementBackToOne      ;It does. Set it back to 1
                  jne        @ContinueLoop                   ;It does not, continue loop
                 
                  @ContinueLoop:
                                 mov    eax, TextPosOffsetMatrix          ;Because it did not, let's
                                                                                              ;apply that value
                                 mov    TextElementIndex, eax            ;Let's update the index-
                                                                                              ;pointer array element
                                                                                              ;Move the next letter into
                                                                                              ;the single character
                                                                                              ;register                             
                                 jmp @UpdateCharacters
                               
                @SetElementBackToOne:
                                                              mov    TextPosOffsetMatrix, 1
                                                              mov    eax, TextPosOffsetMatrix                 
                                                              mov    TextElementIndex, eax
                                                                                     
                                                              jmp    @UpdateCharacters

@UpdateComplete:
;Now we loop to display the text
push ecx
mov ecx, 0        ;Prime the loop
jmp @ReLoop

    @ReLoop:
            inc ecx
            cmp ecx,
            je @FinishSineEffect
            mov eax, TextElementIndex
            mov edx, tSmallText1
            invoke DrawLCDText, 6, 300 + TextElementIndex, LCDTEXTSIZE_SMALL, ADDR tSmallText1
            jmp @ReLoop         

    @FinishSineEffect:
                ;invoke MessageBox,hwnd,ADDR tSmallText1,ADDR tmpText,MB_OK
                pop ecx
                ; --- Blit the drawn LCD onto the back buffer ---
                invoke BitBlt, hBackDC,0,0,+WindowWidthSizeOffset, +WindowHeightSizeOffset, hLCDDC, 0,0, SRCCOPY
                                 
                ; --- Blit the monochrome label onto the back buffer ---
                invoke BitBlt, hBackDC,0,0,+WindowWidthSizeOffset, +WindowHeightSizeOffset, hLabelDC, 0, 0, SRCAND

ret
DrawLCD endp


I know I know... still lots of HLL Constructions.. eventually I'll get rid of them all, but I haven't had the time to read the link on ranges that Roticv posted, plus I've been so busy trying to figure out where I missed up on the usage of registers and register contents that I haven't had free time to rework the code for more of a linear flow (over an event-driven flow). Unfortunately the code window kinda botched my indents a bit, I pasted the code in and spent some time re-indenting it but alas it seems like my effort was in vain.. Hope the code can still be followed..
Posted on 2005-09-24 15:52:27 by EtErNiTy
EtErNiTy - common advises
1.could you put sources into zips - this long bands make topic unreadable :( or place only exact line where error occured.
2.do not work with complex examples: you will definitely fail and bring us a headake with answering the question :)
3.you placed a lot of source, but it is not clear what "WindowWidthSizeOffset" and "WINDOW_WIDTH" mean - mb try to place them into brackets together:
4.HLL constructions are invented to prettify source looking, but you should not start from them in assembler: firstly you should have success without them, and when you will understand clear how it all works, then you may decide which style to use.

regards!

Hi, Syn!
I'm glad to meet you in one topic together ;) :)
Posted on 2005-09-26 00:40:12 by Shoo
hehehe yeah I had a feeling it might have been generating alot of headaches, I appologize for that.. Ask and ye shall receieve. Was saving giving out the source until it was finished, but here goes (the zip is attached to this post. I included both the MASM source, don't worry about coding it over the FASM, I can take care of that (I think lol)  At best I can get it to scroll the text accrossed the backdrop, but all on the same Y coord  Oh also, take out the mp3 song, i'd like to upload it witht he zip because I really like it and think it would work great for a demo background song but alas the server only allows 256kb per post (meant for just source upload).

Unpack them to this directory to mimic it more close to what I'm looking at (You may have to make a few directories, yes directory. NOT folders, I refuse to call them folders lol)

C:\masm32\MySource\ASMDemos

Oh yeah, also on here I go by the name EtErNiTy, but I typically use the the nick StakFallT.. That's why you'll see the text in the demo "StakFallT presents[...]" At first, I decided against using StakFallT, 'cause it was kinda a neat hacker type of handle I thought, and in a way implying knowledge, but then I realized how many issues I have with asm so I decided against using it here, but thinking about it some more I may change my display name to show up as that now as it's more literally correct lol
Attachments:
Posted on 2005-09-27 20:39:31 by EtErNiTy
is lcd.rc/res same with demo1.rc/res? if yes - i do not see anything - will check far (w2k i'm using)
-----
i see - i have no soundcard and have no audio-cd near me :)
-----
and have a crash after i saw the window - will dig deeper
Posted on 2005-09-28 02:07:16 by Shoo
now have no crash:
.ELSEIF eax==WM_TIMER
    ; --- display update timer ---
    .IF wParam==MAINTIMERID
    ;add tSmallTextCounter, 1
          inc tSmallTextCounter
          .IF tSmallTextCounter > 220
                mov tSmallTextCounter, 1
;      @InvalidateWindow:
                ; Invalidate the window to force a repaint
                invoke InvalidateRect, hWnd, NULL, FALSE
          .ENDIF
    ;.ELSEIF                wParam==TextScroll

.ENDIF
Posted on 2005-09-28 02:28:22 by Shoo
yeah lcd.res is in essence the same as demo1.res
Posted on 2005-09-28 07:07:13 by EtErNiTy