Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
; Display the value of 10!, which is precomputed at assembly time
|
||||
; on any Commodore 8-bit.
|
||||
|
||||
.ifndef __CBM__
|
||||
.error "Target must be a Commodore system."
|
||||
.endif
|
||||
|
||||
; zero-page work pointer
|
||||
temp = $fb
|
||||
|
||||
; ROM routines used
|
||||
chrout = $ffd2
|
||||
|
||||
.code
|
||||
|
||||
lda #<tenfactorial
|
||||
sta temp
|
||||
lda #>tenfactorial
|
||||
sta temp+1
|
||||
ldy #0
|
||||
loop:
|
||||
lda (temp),y
|
||||
beq done
|
||||
jsr chrout
|
||||
iny
|
||||
bne loop
|
||||
done:
|
||||
rts
|
||||
|
||||
.data
|
||||
|
||||
; the actual value to print
|
||||
tenfactorial: .byte 13,"10! = ",.string(10*9*8*7*6*5*4*3*2*1),13,0
|
||||
Loading…
Add table
Add a link
Reference in a new issue