Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
; Division procedure for 16-bit numbers in 6502 assembler
; for Atari XE
; Input: A = numerator (16-bit), X = denominator (16-bit)
; Output: A = quotient, Y = remainder
; Clear the quotient and remainder registers
LDX #$0000
LDY #$0000
; Loop until the numerator is less than the denominator
loop:
CMP A,X
BCS skip
SBC A,X
INY
JMP loop
; Store the quotient in the A register
skip:
STA A
; The Y register contains the remainder
; End of division procedure
; Simple 256-byte demo for Atari XE in 6502 assembler
; Set up the stack pointer and clear the screen
LDX #$FF
TXS
CLR
; Set up the display list
LDA #$70
STA $D40E
LDA #$00
STA $D40F
; Set up the player/missile graphics data
LDA #$55
STA $D000
LDA #$AA
STA $D001
; Set up the player/missile graphics registers
LDA #$02
STA $D015
LDA #$01
STA $D01D
; Set up the playfield graphics data
LDA #$F0
STA $0400
LDA #$0F
STA $0401
; Set up the playfield graphics registers
LDA #$03
STA $D016
LDA #$02
STA $D01E
; Set up the color registers
LDA #$0F
STA $D021
LDA #$F0
STA $D022
; Set up the vertical sync register
LDA #$01
STA $D01C
; Enable the graphics display
LDA #$01
STA $D01A
; Loop forever
loop:
JMP loop
; End of demo
; Simple 256-byte demo for Commodore C64
; Written in 6502 assembly language
; Set up the screen and color memory
lda #$00
sta $d020
sta $d021
; Set the background color to blue
lda #$11
sta $d021
; Set the text color to white
lda #$01
sta $d020
; Clear the screen
lda #$20
sta $0400
sta $0500
sta $0600
sta $0700
; Print "Hello, World!" at the top of the screen
lda #$48 ; H
sta $0400
lda #$45 ; E
sta $0401
lda #$4c ; L
sta $0402
lda #$4c ; L
lda #$4f ; O
sta $0404
lda #$, ; , (space)
sta $0405
lda #$57 ; W
sta $0406
lda #$4f ; O
sta $0407
lda #$52 ; R
sta $0408
lda #$4c ; L
sta $0409
lda #$44 ; D
sta $040a
lda #$21 ; !
sta $040b
; Wait for a key press
loop:
jsr $ffd2
cmp #$ff
beq loop
; Done
rts
solo/ng:
podoba mi sie za to najszybsze kasowanie ekranu, jakie widzialem na 6502.