소스 검색

Move print(n)str from core to shell

These routines had hardcoded references to ACIA and didn't belong to the
core.
pull/10/head
Virgil Dupras 5 년 전
부모
커밋
fc0cdede55
2개의 변경된 파일35개의 추가작업 그리고 35개의 파일을 삭제
  1. +0
    -35
      parts/core.asm
  2. +35
    -0
      parts/shell.asm

+ 0
- 35
parts/core.asm 파일 보기

@@ -176,41 +176,6 @@ parseHexPair:
pop bc
ret

; print null-terminated string pointed to by HL
printstr:
push af
push hl

.loop:
ld a, (hl) ; load character to send
or a ; is it zero?
jr z, .end ; if yes, we're finished
call aciaPutC
inc hl
jr .loop

.end:
pop hl
pop af
ret

; print A characters from string that HL points to
printnstr:
push bc
push hl

ld b, a
.loop:
ld a, (hl) ; load character to send
call aciaPutC
inc hl
djnz .loop

.end:
pop hl
pop bc
ret

; Compares strings pointed to by HL and DE up to A count of characters. If
; equal, Z is set. If not equal, Z is reset.
strncmp:


+ 35
- 0
parts/shell.asm 파일 보기

@@ -123,6 +123,41 @@ shellLoop:
.prompt:
.db "> ", 0

; print null-terminated string pointed to by HL
printstr:
push af
push hl

.loop:
ld a, (hl) ; load character to send
or a ; is it zero?
jr z, .end ; if yes, we're finished
SHELL_PUTC
inc hl
jr .loop

.end:
pop hl
pop af
ret

; print A characters from string that HL points to
printnstr:
push bc
push hl

ld b, a
.loop:
ld a, (hl) ; load character to send
SHELL_PUTC
inc hl
djnz .loop

.end:
pop hl
pop bc
ret

printcrlf:
ld a, ASCII_CR
SHELL_PUTC


불러오는 중...
취소
저장