flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Compiler Internals > DS: prefix not generated for some 16-bit address modes | 
  
| Author | 
  | 
              
| 
                  
                   revolution 22 Jul 2005, 02:10 
                  You are correct. The Intel manual states that for 16 bit addressing:
 
                  
                Quote: The default segment register is SS for the effective addresses containing a BP index, DS for other effective  | 
              |||
                  
  | 
              
| 
                  
                   vid 22 Jul 2005, 07:31 
                  Quote: The default segment register is SS for the effective addresses containing a BP index, DS for other effective And what about SP then?  | 
              |||
                  
  | 
              
| 
                  
                   revolution 22 Jul 2005, 07:45 
                  Quote: And what about SP then?  | 
              |||
                  
  | 
              
| 
                  
                   vid 22 Jul 2005, 07:50 
                  oh yes, too much time spent in 32bits. sorry. 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   revolution 22 Jul 2005, 09:18 
                  Hehe, my boss doesn't know but I took a bit of time to look into this:
 
                  
                Here is a fix for you: Code: ;find this label around line 5742 in X86_64.INC store_segment_prefix_if_necessary: mov al,[segment_register] or al,al jz segment_prefix_ok ;insert the following 6 lines cmp [code_type],16 jnz segment_prefix_not_16bit cmp bl,25h jnz segment_prefix_not_16bit xchg bh,bl segment_prefix_not_16bit: ;and the rest of the code follows on from here cmp al,3 je ss_prefix cmp al,4 ;.... Code: use16 mov ax,[ds:si+bp] mov ax,[ds:bp+si] mov ax,[es:si+bp] mov ax,[es:bp+si] mov ax,[ss:si+bp] mov ax,[ss:bp+si] mov ax,[cs:si+bp] mov ax,[cs:bp+si] BTW: this is not a fix for 32 bit mode with 16 bit address override (67h). I will leave the real fix to the author.  | 
              |||
                  
  | 
              
| 
                  
                   Tomasz Grysztar 26 Jul 2005, 08:57 
                  Thanks, I will release a fix soon. 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   Tomasz Grysztar 28 Jul 2005, 15:17 
                  Fixed in 1.63.2. 
                  
                 | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.