flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > DOS > problem with a text displaying code.... | 
  
| Author | 
  | 
              
| 
                  
                   crc 06 Aug 2004, 18:08 
                  Easy enough. Just change the end of the WriteStr routine to:
 
                  
                Code: Continue: mov al, byte [si] stosw inc si cmp byte [si], 0 jnz Continue ret And all will be well  | 
              |||
                  
  | 
              
| 
                  
                   windwakr 06 Aug 2004, 18:25 
                  Thanks!  
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   Matrix 04 Sep 2004, 21:55 
                  I give a sample code on how to write to screen by writing to memory mapped port @ $A000 segment
 
                  Code: writestring80x25: ; DX = address of string bl=x bh=y cl=color , 0 terminated string ! push ds push si push es push di push $b800 pop es mov si,dx mov ax,80 mul bh xor bh,bh add ax,bx shl ax,1 mov di,ax mov ah,cl again: lodsb or al,al jz done stosw cmp al,0 jmp again done: pop di pop es pop si pop ds ret moderated myself --- Last edited by Matrix on 29 Oct 2005, 01:37; edited 3 times in total  | 
              |||
                  
  | 
              
| 
                  
                   Matrix 05 Sep 2004, 01:21 
                  windwakr wrote: I found this code on the forum somewhere....the problem is that it adds a space after the string you use. how would that be fixed i think you have over complicated your code a bit, you should see the problem first time looking at it, the first reason is because you wrote it moderated myself --- Last edited by Matrix on 29 Oct 2005, 01:43; edited 1 time in total  | 
              |||
                  
  | 
              
| 
                  
                   Matrix 09 Sep 2004, 17:21 
                  
                  
                 | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.