i just wanna know if i can install 32-bit C libs from FreeBSD/GhostBSD that go with CC-Clang compiler to make the code below..
Code: Select all
;
; pwn5_i386four.asm
;
; by alCoPaUL [GIMO][As][aBrA][NPA][b8][BCVG][rRlf]
; 6/25/2023 NYC
;
; nasm <dash>f elf32 pwn5_i386four.asm
; cc <dash>m32 <dash>o pwn5_i386four pwn5_i386four.o
;
;
global main
extern printf
section .text
main:
enter 0,0
mov al,10
mov bl,45
z:lea edx,[a]
mov cx,536
r:cmp byte [edx],bl
je s
jmp u
s:mov byte [edx],al
u:inc edx
dec cx
cmp cx,0
jnz r
push a
push i
call printf
mov al,10
cmp bl,45
xchg al,bl
je z
push x
push i
call printf
leave
ret
section .data
x:db 2Ch,32h,37h,68h,2Ch,30h,0
i:db 25h,73h,0
a:db ';-; pwn5_i386four.asm-;-; by alCoPaUL [GIMO][As][aBrA][NPA][b8][BCVG][rRlf]-; 6/25/2023 NYC-;-; nasm <dash>f elf32 pwn5_i386four.asm-; cc <dash>m32 <dash>o pwn5_i386four pwn5_i386four.o-;-;-global main-extern printf-section .text-main:-enter 0,0-mov al,10-mov bl,45-z:lea edx,[a]-mov cx,536-r:cmp byte [edx],bl-je s-jmp u-s:mov byte [edx],al-u:inc edx-dec cx-cmp cx,0-jnz r-push a-push i-call printf-mov al,10-cmp bl,45-xchg al,bl-je z-push x-push i-call printf-leave-ret-section .data-x:db 2Ch,32h,37h,68h,2Ch,30h,0-i:db 25h,73h,0-a:db ',27h,0
i was trying to make this because i've read that GhostBSD64 can run 32-bit files natively..
and the code below, i can make and run with no problems whatsoever..
Code: Select all
;
; quineB_S_D.asm
;
; by alCoPaUL [GIMO][As][aBrA][NPA][b8][BCVG][rRlf]
; June 21, 2023 NYC
;
; nasm <dash>f elf64 quineB_S_D.asm
; cc <dash>o quineB_S_D quineB_S_D.o
;
global main
extern printf
section .text
main:push rbx
mov cl,10
mov bl,45
z:lea r9,[a]
mov dx,610
r:cmp byte[r9],bl
je s
jmp u
s:mov byte[r9],cl
u:inc r9
dec dx
cmp dx,0
jnz r
lea rdi,[i]
lea rax,[a]
mov rsi,rax
xor rax,rax
call printf wrt ..plt
mov cl,10
cmp bl,45
xchg cl,bl
je z
lea rdi,[i]
lea rax,[x]
mov rsi,rax
xor rax,rax
call printf wrt ..plt
pop rbx
ret
section .data
default rel
x:db 2Ch,32h,37h,68h,2Ch,30h,0
i:db 25h,73h,0
a:db ';-; quineB_S_D.asm-;-; by alCoPaUL [GIMO][As][aBrA][NPA][b8][BCVG][rRlf]-; June 21, 2023 NYC-;-; nasm <dash>f elf64 quineB_S_D.asm-; cc <dash>o quineB_S_D quineB_S_D.o-;-global main-extern printf-section .text-main:push rbx-mov cl,10-mov bl,45-z:lea r9,[a]-mov dx,610-r:cmp byte[r9],bl-je s-jmp u-s:mov byte[r9],cl-u:inc r9-dec dx-cmp dx,0-jnz r-lea rdi,[i]-lea rax,[a]-mov rsi,rax-xor rax,rax-call printf wrt ..plt-mov cl,10-cmp bl,45-xchg cl,bl-je z-lea rdi,[i]-lea rax,[x]-mov rsi,rax-xor rax,rax-call printf wrt ..plt-pop rbx-ret-section .data-default rel-x:db 2Ch,32h,37h,68h,2Ch,30h,0-i:db 25h,73h,0-a:db ',27h,0
(and please no files with GNU attached on it..)
thank you...
~ alCoPaUL[GIMO][GOTH][b8]