News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Print Multi String Zero

Started by herge, October 20, 2008, 09:08:35 PM

Previous topic - Next topic

herge


Hi All:

A short program.


; PRTMSZ.ASM Monday, October 20, 2008 4:53 PM
; Print Multi String Zero
; By Herge
  include \masm32\include\masm32rt.inc
.data
PrtStk dd Space
       dd buffer
       dd CrLf
       dd buffer
       dd Space
       dd buffer
       dd CrLf
       dd 0 ; Don't Forget END Marker
buffer db 20 dup(32)
       db 0
Space  db 32,0
CrLf   db 13, 10 ,0
.code
PrtMsZ proc; SI > Table of String Addresses
     mov ebx, dword ptr[esi]
     and ebx, ebx
     jz PrtMsZX
     invoke StdOut, ebx
     add esi,4
     jmp PrtMsZ
PrtMsZX:     
     ret
PrtMsZ endp
Start:
     mov ebx, 7
     invoke crt__ultoa, ebx, offset buffer, 10
     mov esi, offset PrtStk
     call PrtMsZ
     inkey
     exit
     end Start


Regards herge
// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy