0

I'm having difficulty with x86 assembly. (I'm programming on Emu8086 for Windows / 64.) I would like to know how to write on the screen this matrix with its respective interruptions

 TETRA_T2   DB  32, 32, 32,32
               DB  32, 219,32,32
               DB  32, 219,219,32 
               DB  32, 219,32,32  

I can't put '$' at the end of the array and use for exemple:

 mov DX, offset VETOR_TELA 



            mov ah,9H
            int 21h

It will conflict with another matrix that I wrote this way.

Does anyone know of any way to write this matrix?

Ross Ridge
  • 38,414
  • 7
  • 81
  • 112
  • Try int 21/AH=40 on file descriptor 1. – fuz Nov 19 '19 at 23:21
  • You mean "print? Loop over it and print each integer separately. [Displaying numbers with DOS](//stackoverflow.com/q/45904075). It's obviously not a string of ASCII characters so you don't want to copy those bytes directly as text. Or do you want to do the equivalent of C `fwrite()` on this binary data like fuz suggested? – Peter Cordes Nov 19 '19 at 23:22
  • Hi Petter, these numbers are actually the ascii numbers that I will have to write on the screen. In this case 32 is a blank space ... I wonder if it would have a more practical way than having to write character by character – Maurício Z.B Nov 20 '19 at 13:13
  • 1
    @YODA Not really. You could assemble the entire string in memory in advance and then write it out at once, but the effort is roughly the same. – fuz Dec 03 '19 at 17:54
  • exemple please? – Maurício Z.B Dec 03 '19 at 21:45

0 Answers0