Jump to content
Sign in to follow this  
  • entries
    292
  • comments
    557
  • views
    154334

Yeah, so I got bored...

Sign in to follow this  
TANSTAAFL

124 views


start:

JMP ____ 0E00 7E __ __


memset:
;in: A=character, B=bytecount, X=location
;out: None
;modifies: X,CC,B

loop:
STA ,X+ 0E03 A7 80
DECB 0E05 5A
BNE loop 0E06 26 FB
RTS 0E08 39

clearscreen:
;in: A=character
;out: none
;mod: X,CC,B


LDX #$0400 0E09 8E 04 00
CLRB 0E0C 5F
JSR memset 0E0D BD 0E 03
JSR memset 0E10 BD 0E 03
RTS 0E13 39

memcpyf:
;in: X=source, Y=destination, B=bytecount
;out: none
;mod: X,Y,A,B,CC

loop:
LDA ,X+ 0E14 A6 80
STA ,Y+ 0E16 A7 A0
DECB 0E18 5A
BNE loop 0E19 26 F9
RTS 0E1B 39

memcpyr:
;in: X=source, Y=destination, B=bytecount
;out: none
;mod: X,Y,A,B,CC

loop:
LDA ,X- 0E1C A6 82
STA ,Y- 0E1E A7 A2
DECB 0E20 5A
BNE loop 0E21 26 F9
RTS 0E23 39

scrollscreenup:
;in: none
;out: none
;mod: X,Y,A,B,CC

LDB #$E0
LDX #$0420
LDY #$0400
JSR memcpyf
JSR memcpyf
RTS

scrollscreendown:

;in: none
;out: none
;mod: X,Y,A,B,CC

LDB #$E0
LDX #$05DF
LDY #$05FF
JSR memcpyr
JSR memcpyr
RTS

Sign in to follow this  


2 Comments


Recommended Comments

Two questions:

1. What the hell is it?

2. Are there going to be five days without entries next week or only three?

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!