Thread: Using VPrintf
View Single Post
Old 17 October 2018, 23:15   #4
Hedeon
Sonnet Hacker

 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,001
that's weird. How I have learned it, is VPrintf(fmt, argv)
with fmt pointing to something like

dc.b "my address is %08lx",10

and argv pointing to the actual value (argument) you want to be formatted into that string.

so:

Code:
move.l DosBase,a6
lea fmt(pc),a1
move.l a1,d1
lea argv(pc),a1
move.l a1,d2
jmp _LVOVPrintf(a6)

fmt dc.b "register d0 = %08lx ; register d1 = %08lx",10
cnop 0,4
argv dc.l $deadbeef,12345678
At least that is how it works for VFPrintF which only adds an fh. Both values in argv will be formatted to a hexidecimal number in above example. (oh, and I like PC relative, don't mind me)

Last edited by Hedeon; 17 October 2018 at 23:36.
Hedeon is offline  
 
Page generated in 0.04130 seconds with 11 queries