ちんこ

This commit is contained in:
2025-12-11 12:41:55 +09:00
parent cd56860bb4
commit 0cbcb30d65
2 changed files with 3 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ mp4: build run convert-mp4 clean
build:
nasm -f elf64 main.s -o main.o
ld main.o -o gen
strip gen
run:
./gen
@@ -18,6 +19,6 @@ convert-mp4:
ffmpeg -i output-%02d.ppm -r 60 output.mp4
clean:
rm -rf output-*.ppm
rm -rf output-*.ppm *.o *.core
.PHONY: all gif mp4 build run convert-gif convert-mp4 clean

2
main.s
View File

@@ -51,7 +51,7 @@ frameloop:
lea rsi, [suffix]
call strcpy ; 「.ppm\0」の追加
mov rax, 5 ; sys_openat
mov rax, 5 ; sys_open
lea rdi, [outfile]
mov rsi, 0x100601 ; 0x100601 = 0001 0000 0000 0110 0000 0001 = 1048576 + 1024 + 512 + 1 = 1050113
; O_WRONLY = 0x0001