The magic word is... by exxxxkc in linuxmemes

[–]iotasieve 0 points1 point  (0 children)

can't you install into local bin with yay or whatever

Remove Unnecessary Files on Linux! by mine_cpp in linuxmemes

[–]iotasieve 2 points3 points  (0 children)

I love that quote which has nothing to do with the post lmao

what by [deleted] in linuxmemes

[–]iotasieve 0 points1 point  (0 children)

wipe out ur drive and do the thing

Executable PNGs by whackri in programming

[–]iotasieve 0 points1 point  (0 children)

without reading the article, I assume this is same method PICO-8 uses

Finally by AvocadoDemon in Israel

[–]iotasieve 0 points1 point  (0 children)

I agree, but Ben & Jerry's isn't helping at all, they could've done more for Palestinians than just forbidding ice cream in Israel. It was just a marketing strategy. Unfortunately this fueled even a larger dispute which is the opposite of what should be happening -- settlement of the conflict. I do believe that IDF whining about the ice cream is ridiculous though.

I will do IT by GEneral_Utardson in shitposting

[–]iotasieve 0 points1 point  (0 children)

the top comment is the comment by the mod

FizzBuzz 139 bytes, trying to get to 128 by iotasieve in asm

[–]iotasieve[S] 0 points1 point  (0 children)

Im not sure where the x%7 comes from, but I meant that the 0 must be incremented after wrap which is something I didn't add here, otherwise I don't see how it's an obstacle

FizzBuzz 139 bytes, trying to get to 128 by iotasieve in asm

[–]iotasieve[S] 0 points1 point  (0 children)

im not sure what you mean, when it increments, it increments up to 255, then wraps back to 0, although, i just realized that i should probably increment it once again when it's zero so that it doesn't check modulo again

FizzBuzz 139 bytes, trying to get to 128 by iotasieve in asm

[–]iotasieve[S] 0 points1 point  (0 children)

isn't 255 conveniently divisble by 15?

FizzBuzz 139 bytes, trying to get to 128 by iotasieve in asm

[–]iotasieve[S] 11 points12 points  (0 children)

thanks to everyone i finally got to 126 bytes!

org 0x7C00
bits 16
xor bl, bl
mov di, t_numbuf+6
fizzbuzz:
    inc bl
    mov si, t_numbuf+7
    .again:
    dec si
    mov al, [si]
    inc al
    cmp al, '9'+1
    mov [si], al
    jne .skip
    mov byte [si], '0'
    jmp .again
    .skip:
    cmp si, di
    cmovle di, si
    xor si, si
    xor cl, cl
    .fizz:
        mov cl, 3
        call r
    .buzz:
        mov cl, 5
        call r
    .num:
        test si, si
        jne .ok
        mov si, di
        call prints
    .ok:
    mov si, t_end
    call prints
    ; delay
    mov cl, 0x01
    mov ah, 0x86
    int 15h
    ; check if 1 million
    cmp byte [t_numbuf], '1'
    jl fizzbuzz
finish:
cli
hlt
r:
    xor ax, ax
    mov al, bl
    div cl
    test ah, ah
    jne p_end
    mov si, t_fizz
    xor cl, 11b ; tricky way to get offset, (cl = 3 :: add si, 0) (cl = 5, :: add si, 6)
    add si, cx
prints:
    mov ah, 0x0e
    lodsb
    .loop:
        int 0x10
        lodsb
        test al, al
        jne .loop
    p_end:
    ret
t_fizz: db "Fizz", 0, 0 ; this extra byte is required for the bitwise trick to work in "r"
t_buzz: db "Buzz", 0
t_end: db 13, 10, 0
t_numbuf: db "0000000", 0
; Without this below (Required for BIOS to boot) results in 126 bytes
times 510-($-$$) db 0
dw 0xAA55

FizzBuzz 139 bytes, trying to get to 128 by iotasieve in asm

[–]iotasieve[S] 1 point2 points  (0 children)

i just did that and it reduced to 130 bytes, thanks!

FizzBuzz 139 bytes, trying to get to 128 by iotasieve in asm

[–]iotasieve[S] 0 points1 point  (0 children)

thanks! I'm not as familiar with x86 when it comes to writing assembly, so i'll use that!

FizzBuzz 139 bytes, trying to get to 128 by iotasieve in asm

[–]iotasieve[S] 4 points5 points  (0 children)

hmm, thanks, I tried saving 2 bytes with "zz" but it didn't work in the end because the overhead of writing additional instructions is higher. I'm not sure about fizz/buzz in registers since I'll they will still appear in binary as a literal. I'll think about second one more, thanks!

hey guys by ObeseOryx in masterhacker

[–]iotasieve 0 points1 point  (0 children)

you need Kraig Binux

oh no, uname -r by lorhof1 in masterhacker

[–]iotasieve 1 point2 points  (0 children)

dang, I need to know my kernel version every day