Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; File generated by cc65 v 2.18 - Git c15f497
- ;
- .fopt compiler,"cc65 v 2.18 - Git c15f497"
- .setcpu "6502"
- .smart on
- .autoimport on
- .case on
- .debuginfo off
- .importzp sp, sreg, regsave, regbank
- .importzp tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4
- .macpack longbranch
- .forceimport __STARTUP__
- .export _mem
- .export _width
- .export _height
- .export _line
- .export _main
- .segment "DATA"
- _width:
- .word $0028
- _height:
- .word $0019
- _mem:
- .word 1024
- ; ---------------------------------------------------------------
- ; void __near__ line (int, int, int, int, unsigned char)
- ; ---------------------------------------------------------------
- .segment "CODE"
- .proc _line: near
- .segment "CODE"
- jsr pusha
- ldy #$04
- jsr ldaxysp
- sec
- ldy #$07
- sbc (sp),y
- pha
- txa
- iny
- sbc (sp),y
- tax
- pla
- jsr pushax
- ldy #$04
- jsr ldaxysp
- sec
- ldy #$07
- sbc (sp),y
- pha
- txa
- iny
- sbc (sp),y
- tax
- pla
- jsr pushax
- ldx #$FF
- txa
- jsr pushax
- jsr pushax
- ldy #$05
- jsr ldaxysp
- jsr negax
- jsr pushax
- jsr decsp2
- ldy #$0B
- jsr ldaxysp
- cpx #$80
- bcc L0009
- ldy #$0D
- jsr pushwysp
- ldx #$FF
- txa
- jsr tosmulax
- ldy #$0A
- jsr staxysp
- L0009: ldy #$09
- jsr ldaxysp
- cpx #$80
- bcc L000D
- ldy #$0B
- jsr pushwysp
- ldx #$FF
- txa
- jsr tosmulax
- ldy #$08
- jsr staxysp
- L000D: ldy #$14
- jsr ldaxysp
- ldy #$0F
- cmp (sp),y
- txa
- iny
- sbc (sp),y
- bvc L003F
- eor #$80
- L003F: bpl L0011
- ldx #$00
- lda #$01
- ldy #$06
- jsr staxysp
- L0011: ldy #$12
- jsr ldaxysp
- ldy #$0D
- cmp (sp),y
- txa
- iny
- sbc (sp),y
- bvc L0040
- eor #$80
- L0040: bpl L0015
- ldx #$00
- lda #$01
- ldy #$04
- jsr staxysp
- L0015: ldy #$0D
- jsr pushwysp
- ldy #$0B
- jsr ldaxysp
- jsr tosicmp
- bmi L0019
- beq L0019
- ldy #$0B
- jsr ldaxysp
- jsr negax
- L0019: ldy #$03
- jsr ldaxysp
- jsr asrax1
- ldy #$02
- jsr staxysp
- L0021: lda _mem
- ldx _mem+1
- jsr pushax
- ldy #$18
- jsr pushwysp
- ldy #$18
- jsr pushwysp
- lda _width
- ldx _width+1
- jsr tosmulax
- jsr tosaddax
- jsr tosaddax
- sta ptr1
- stx ptr1+1
- ldy #$0C
- lda (sp),y
- ldy #$00
- sta (ptr1),y
- ldy #$14
- jsr ldaxysp
- ldy #$0F
- cmp (sp),y
- bne L0026
- txa
- iny
- cmp (sp),y
- bne L0026
- ldy #$12
- jsr ldaxysp
- ldy #$0D
- cmp (sp),y
- bne L0026
- txa
- iny
- cmp (sp),y
- beq L001F
- L0026: ldy #$03
- jsr ldaxysp
- jsr stax0sp
- jsr pushax
- ldy #$0D
- jsr ldaxysp
- jsr negax
- jsr tosicmp
- bmi L002C
- beq L002C
- ldy #$09
- jsr ldaxysp
- ldy #$02
- jsr subeqysp
- ldy #$07
- jsr ldaxysp
- ldy #$13
- jsr addeqysp
- L002C: jsr ldax0sp
- ldy #$08
- cmp (sp),y
- txa
- iny
- sbc (sp),y
- bvc L0043
- eor #$80
- L0043: jpl L0021
- ldy #$0B
- jsr ldaxysp
- ldy #$02
- jsr addeqysp
- ldy #$05
- jsr ldaxysp
- ldy #$11
- jsr addeqysp
- jmp L0021
- L001F: ldy #$15
- jmp addysp
- .endproc
- ; ---------------------------------------------------------------
- ; void __near__ main (void)
- ; ---------------------------------------------------------------
- .segment "CODE"
- .proc _main: near
- .segment "CODE"
- jsr push0
- jsr push0
- lda #$14
- jsr pusha0
- jsr pusha0
- lda #$05
- jmp _line
- .endproc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement