| |
General Zoff Account closed
Registered: Dec 2004 Posts: 7 |
Stupid Routines ....
Found this one on one of my old work disks ...
Let's collect the most stupid routines you have written on your old C64 ... ;-)
.C:6000 78 SEI
.C:6001 A2 00 LDX #$00
.C:6003 BD 11 60 LDA $6011,X
.C:6006 9D 00 00 STA $0000,X
.C:6009 E8 INX
.C:600a E0 40 CPX #$40
.C:600c D0 F5 BNE $6003
.C:600e 4C 00 00 JMP $0000
.C:6011 2F 34 A9 RLA $A934
.C:6014 A9 EA LDA #$EA
.C:6016 8D 34 A9 STA $A934
.C:6019 F0 24 BEQ $603F
.C:601b A2 00 LDX #$00
.C:601d A9 EA LDA #$EA
.C:601f 9D 40 00 STA $0040,X
.C:6022 E8 INX
.C:6023 D0 F8 BNE $601D
.C:6025 EE 10 00 INC $0010
.C:6028 AD 10 00 LDA $0010
.C:602b C9 00 CMP #$00
.C:602d F0 0B BEQ $603A
.C:602f C9 FF CMP #$FF
.C:6031 D0 E8 BNE $601B
.C:6033 A9 00 LDA #$00
.C:6035 8D 0F 00 STA $000F
.C:6038 F0 E1 BEQ $601B
.C:603a A9 D0 LDA #$D0
.C:603c 8D 08 00 STA $0008
.C:603f A9 37 LDA #$37
.C:6041 85 01 STA $01
.C:6043 EE 20 D0 INC $D020
.C:6046 A9 34 LDA #$34
.C:6048 85 01 STA $01
.C:604a EA NOP
.C:604b EA NOP
.C:604c EA NOP
.C:604d EA NOP
.C:604e EA NOP
.C:604f EA NOP
.C:6050 EA NOP
|
|
... 42 posts hidden. Click here to view all posts.... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
//Set up a 16x16 charset..
ldy #$0f
!loop:
clc
tya
ldx #0
ss: sta screen+$0354,x
inx
adc #$10
bcc ss
lda ss+1
sbc #40
sta ss+1
bcs !+
dec ss+2
!: dey
bpl !loop-
|
| |
Devia
Registered: Oct 2004 Posts: 401 |
my SX64+RR+RRNet Radio Reciever with Full Screen Spectrograph:
start:
sei
lda #$01
sta $de01
lda #$00
sta $d011
loop:
lda $de08
lda $de09
sta $d418
sta $d020
jmp loop
:-P
|
| |
j0x
Registered: Mar 2004 Posts: 215 |
Oswald has given the crucial hint :) |
| |
Mace
Registered: May 2002 Posts: 1799 |
I get it... :-)
Interestingly cryptic (not related to the group). |
| |
Quetzal
Registered: Jul 2002 Posts: 71 |
;Diagonal "rasters" in $12 bytes:
SEI
ROR $D011
LOOP: DEC $D020
INC $D020
LDX #$03
LOOP2: DEX
BNE LOOP2
JMP LOOP
Other values for X like 01, 02 and 04 are fun to try too!
|
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
;Example of code with way too many comments...
lda #$00 ;load the CPU's "accumulator" register with the value 0
sta $d020 ;store it to the VIC-II chip's border color register,
;thus making the border color black
sta $d021 ;also store the same value (0) to the VIC-II chip's background
;color register, thus having the same effect as before, namely
;to produce black color, except that this time it's for the
;screen's background color
|
| |
WVL
Registered: Mar 2002 Posts: 896 |
Quote:
;Example of code with way too many comments...
lda #$00 ;load the CPU's "accumulator" register with the value 0
sta $d020 ;store it to the VIC-II chip's border color register,
;thus making the border color black
sta $d021 ;also store the same value (0) to the VIC-II chip's background
;color register, thus having the same effect as before, namely
;to produce black color, except that this time it's for the
;screen's background color
I think you should add some more comments. It's completely unreadable IMHO. |
| |
Steppe
Registered: Jan 2002 Posts: 1510 |
Quote:
;Example of code with way too many comments...
lda #$00 ;load the CPU's "accumulator" register with the value 0
sta $d020 ;store it to the VIC-II chip's border color register,
;thus making the border color black
sta $d021 ;also store the same value (0) to the VIC-II chip's background
;color register, thus having the same effect as before, namely
;to produce black color, except that this time it's for the
;screen's background color
Cruzer, it doesn't work. I get a black screen every time. Maybe I should read the comments one day to see what it does... %) |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
Quote: ;Diagonal "rasters" in $12 bytes:
SEI
ROR $D011
LOOP: DEC $D020
INC $D020
LDX #$03
LOOP2: DEX
BNE LOOP2
JMP LOOP
Other values for X like 01, 02 and 04 are fun to try too!
The same in $0f bytes:
sei
ror $d011
loop: dec $d020
inc $d020
jsr $b123
bne loop
--
To alcohol! The cause of -- and solution to -- all of life's problems!
-- Homer Simpson
|
| |
Scout
Registered: Dec 2002 Posts: 1570 |
I was trying to make some nice effect for the limiTED C16/Plus4 64 byte compo.
I failed... back to the drawing board because this stinks! :D
It's exactly 64 bytes big and I altered to make it work on the c64.
This is just terrible =)
*=$1000
lda #$3b
sta $d011
lda #$18
sta $d018
lda #<$2000
ldy #>$2000
sta $f0
sty $f1
lda #%01010101
sta $f2
ldx #31
fillhires
ldy #$00
loop1
sta ($f0),y
eor #%10101010
iny
bne loop1
inc $f1
dex
bpl fillhires
mainloop
lda #>$0400
sta $f1
ldx #3
fillscreen
ldy #$00
loop2
tya
eor $f2
sta ($f0),y
iny
bne loop2
inc $f2
inc $f1
dex
bpl fillscreen
jmp mainloop
|
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |