Random line of code thread
category: code [glöplog]
clr.w -(sp)
trap #1
trap #1
lda split_table, x
sta $d012
sta $d012
Code:
ldh a,[rLY]
rra
and %01111100
ldh [rBGPD],a
Code:
db $64,$66,$0f,$bf,$15 {movsx edx, fs:[di]} {v.x}
@n_plan_x2: db $66,$69,$d2, $00,$00,$00,$00 {imul edx, n_plan.x}
; really porky and fast coded code
.ins
SF D0
TST.b D0 ; not sure if necessary
BEQ.S .P0
.P1
move.l adrpatern,a1
bra.s .titi
.P0
move.l adrpatern+4,a1
.titi
eor.w #$0100,.ins ; transform sf into st and vice versa
; result is alternate value of adrpatern or adrpatern+4 in a1
lea .retour,a6
movem.w (a1)+,d0-d6/a2-a4
jmp (a5)
.retour
.ins
SF D0
TST.b D0 ; not sure if necessary
BEQ.S .P0
.P1
move.l adrpatern,a1
bra.s .titi
.P0
move.l adrpatern+4,a1
.titi
eor.w #$0100,.ins ; transform sf into st and vice versa
; result is alternate value of adrpatern or adrpatern+4 in a1
lea .retour,a6
movem.w (a1)+,d0-d6/a2-a4
jmp (a5)
.retour
Code:
case USB_HEADER_CALL_ACTION:
{
// Function addresses are on PROG(R) : origin = 0x3F8080, length = 0x1F80
// So the address is coded on the last 15 bits and 0x003F8000 is added.
int32_t address = 0x003F8000 + USB_Read16();
int16_t sizeIn = USB_Read8();
switch(sizeIn)
{
case 0x00:
((void (*)(void)) address)();
break;
case 0x02:
((void (*)(int16_t)) address)(USB_Read16());
break;
case 0x04:
((void (*)(int32_t)) address)(USB_Read32());
break;
case 0x22:
((void (*)(int16_t, int16_t)) address)(USB_Read16(), USB_Read16());
break;
case 0x24:
((void (*)(int16_t, int32_t)) address)(USB_Read16(), USB_Read32());
break;
}
}
break;
Code:
case 0x9Eu: // arc
Code:
[18, "yourmom", "in"],
[21, "yourmom", "out"],
Code:
char *number_ret = malloc((size_t)floor(log10((double)INT64_MAX)));
Quote:
; really porky and fast coded code
.ins
SF D0
TST.b D0 ; not sure if necessary
BEQ.S .P0
.P1
The tst.b instruction is necessary, sf and friends do not set any flags.
Code:
*=$1000
init tax
clrreg sta $d400,x
inx
bne clrreg
lda #$0f
sta $d418
sta $d400
sta $d413
lda #$f8
sta $d406
lda #$ed
sta $d40c
nopl dec play+1
rts
play lda #$02
bne nopl
lda #$02
sta play+1
trr lda #$00
bne pll
lda #$80
sta trr+1
asl
sta $d40b
sta $d412
tr ldx #$00
cpx #$04
bne trk
lda v3b+1
eor #%01100000
sta v3b+1
inc count+1
ldx #$00
stx tr+1
trk lda tra,x
sta tran+1
inc tr+1
pll dec trr+1
pl ldx #$07
lda inst,x
sta $d404
bne instok
lda #$08
sta pl+1
instok dec pl+1
lda tra,x
cmp #$04
bne drm
clc
tran adc #$04
drm sta $d401
clc
adc #$04
sta $d408
v3 lda #$00
v3b and #%00011111
sta $d40f
lda #$55
sta $d40b
count lda #$00
cmp #$02
beq v31
cmp #$03
beq v32
cmp #$04
beq v33
cmp #$05
beq v33
cmp #$06
beq v34
rts
v31 lda #$13
sta $d412
dec v3+1
rts
v32 lda #$17
sta $d412
rts
v33 lda #$17
sta $d412
bne *-15
v34 lda #$00
sta count+1
rts
inst .byte $00,$81,$10,$81,$20,$21,$11,$51
tra .byte $00,$08,$0a,$0c,$00,$04,$04,$04
sta <VIA_t1_cnt_lo
POKE 788,82 ; C64
Code:
if (blink) drawStringCenter("Fiddle your knob to restart!", END_FIDDLE_Y);
Code:
Failed to create directory: /dev/null/Default/Code Cache/wasm
Code:
move.w #$0002,copcon(a3)
Code:
moveq #1,d3
ror.b d3,d3
Code:
for(int i=0;i<100;fill(mouseX/80+mouseY/80*10==i?#ff0000:255),rect(i%10*80,i++/10*80,80,80));
if (SCENE == 0 || SCENE == SCENE_LANDSCAPE_2 || SCENE == SCENE_ABSTRACT_EXPR || SCENE == SCENE_MOUNTAIN || SCENE == SCENE_SESSIONS_24 || SCENE == SCENE_LIMINAL) {
Code:
; x1 * (sprite_temp+1)
sty a:WRMPYA
ply
sty a:WRMPYB
clc ; 2
ldy z:z1 ; 3
lda a:RDMPYH
apply_sign sprite_temp+1, x1
adc z:sinox
sta z:sinox
Code:
;magic selfmod copy code cheese
jsr $1100
jmp skipchpoke
Code:
ldh a,[rLY]
cp 127
ret nc
ld b,a
ld a,[Game_TheShapeTime]
sub b
add 128
ldh [rSCY],a
xor a
ldh [rSCX],a
ld hl,rLYC
inc [hl]
ret
plop:
push hl
push bc
ld a,c
call line
pop bc
inc c
ld a,c
hui:
cp 64
jr c,nixo
ld c,0
ld ix,(panf)
push hl
push bc
ld a,c
call line
pop bc
inc c
ld a,c
hui:
cp 64
jr c,nixo
ld c,0
ld ix,(panf)
}
(forgot one again today!)
(forgot one again today!)
Code:
tst.b d7 ; (-36+19*2*3558) % 256 = 0