Author Topic: sprintf_s plus printf  (Read 6674 times)

Offline alCoPaUL

  • Jr. Member
  • *
  • Posts: 74
  • Country: ph
    • Webpage
sprintf_s plus printf
« on: May 15, 2024, 06:06:02 PM »
imma translate this to NASM (should be ezpz) later coz i just finished this version for the other assembler..

snippet below

Code: [Select]
;r9 //      sprintf_s + printf
;r8 //      by alCoPaUL [GIMO]
;rdx //         5/15/2024
;rcx //    Brigada Ocho [b8] Productions
;call // rax
 
extrn printf:proc
extrn sprintf_s:proc
.code
main proc
sub rsp,28h
lea r8,[x]
lea rdx,[i]
lea rcx,[b]
call sprintf_s
mov r8, rax
lea rdx,[b]
lea rcx,[i]
call printf
add rsp,28h
ret
main endp
.data
x db 'Revelation 13'
........
........

full file attached..

enjoy..
« Last Edit: May 15, 2024, 09:18:36 PM by alCoPaUL »

Offline alCoPaUL

  • Jr. Member
  • *
  • Posts: 74
  • Country: ph
    • Webpage
Re: sprintf_s plus printf
« Reply #1 on: May 15, 2024, 09:19:55 PM »
NASM Version

Code: [Select]
;r9 //      sprintf_s + printf
;r8 //      by alCoPaUL [GIMO]
;rdx //         5/15/2024
;rcx //    Brigada Ocho [b8] Productions
;call // rax
global m
extern printf
extern sprintf_s
section .text
m:sub rsp,28h
lea r8,x
lea rdx,i
lea rcx,b
call sprintf_s
mov r8, rax
lea rdx,b
lea rcx,i
call printf
add rsp,28h
ret
section .data
x:db 'Revelation 13'
....
....
....

full file attached..

Offline alCoPaUL

  • Jr. Member
  • *
  • Posts: 74
  • Country: ph
    • Webpage
Re: sprintf_s plus printf
« Reply #2 on: May 15, 2024, 09:23:05 PM »
essential msvcrt.lib for win64asm...