;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- ;; petski: https://www.c64-wiki.com/wiki/File:ASCII-Codes.gif ;;https://www.c64-wiki.com/wiki/Character_set ;; Takes in a PETSKI-code in CODE ;; And prints it ON X_pos, Y_pos ;; Note that this is the real positions divided by 8 .proc char_draw X_pos = $FA Y_pos = $F9 charset = $FB code = $FE petski_position = $FEFF ;reuses code:s memory screen_position = $FCFD ;#### TEMP INIT DATA #### LDA #$10 STA code LDA #$10 STA X_pos STA Y_pos ;We first need to clear some memory LDA #$00 STA petski_position, petski_position, petski_position, Character_generator_ROM, ! ;;Calculate screen_position to use Mov_16 >screen_position, VIC_bank ;; One character is 8 byte, move these bytes to screen LDY #$07 @loop: LDA (>petski_position), Y STA (>screen_position), Y DEY BNE @loop hihi: LDA (>petski_position), Y STA (>screen_position), Y jmp hihi RTS .endproc