eris2010

Documentation: http://frombelow.net/projects/eris2010/
Clone: git clone https://git.frombelow.net/eris2010.git
Log | Files | Refs | README | LICENSE

10print.asm (976B)


      1 ;;; Copyright 2021 Gerd Beuster (gerd@frombelow.net). This is free
      2 ;;; software under the GNU GPL v3 license or any later version. See
      3 ;;; COPYING in the root directory for details.
      4 
      5 ;;; If we are included in boot.asm, we
      6 ;;; should not set the start address
      7 .weak
      8 	BOOT_EMBEDDED = false
      9 .endweak
     10 .if !BOOT_EMBEDDED
     11 	.include "os.inc"
     12 .endif
     13 init:
     14         cld
     15 	#io.SETUP
     16         jsr lfsr.init
     17         jmp ten_print
     18 
     19 ten_print:
     20         .block
     21         ldx #$10
     22 l1:     
     23         ldy #$00
     24 l0:     
     25         dey
     26         bne l0
     27         dex
     28         bne l1
     29         jsr lfsr.step
     30         and #$01
     31         bne slash
     32 .if SYMON
     33 	lda #'\'
     34 	jsr io.putc
     35 .else
     36         #io.PRINTS '╲'
     37 .endif
     38         jsr io.putc
     39         jmp ten_print
     40 slash:  
     41 .if SYMON
     42 	lda #'/'
     43 	jsr io.putc
     44 .else
     45         #io.PRINTS '╱'
     46 .endif
     47         jsr io.putc
     48 	;;  Check if it is time to quit
     49 	jsr io.getc_nonblocking
     50 	tax
     51 	cmp #'q'		; Quit?
     52 	beq reset
     53         jmp ten_print
     54 reset:
     55 	jmp ($fffc)		; Reset
     56         .bend