get cold start display looking okay

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-23 00:23:47 +09:30
1 parent 97988f1c19
commit d4531592df
2 files changed
+23 -4

No files matched your search

+13 -4
View File
@@ -6,10 +6,15 @@ basic_cold_start:
;; Initialise interpretor ;; Initialise interpretor
;; Print start up message ;; Print start up message
;; Print coloured part of the message
ldy #>startup_message ldy #>startup_message
lda #<startup_message lda #<startup_message
jsr print_string jsr print_string
;; Print the rest of the start up message
ldx #34
jsr print_packed_message
;; jump into warm start loop ;; jump into warm start loop
jmp basic_warm_start jmp basic_warm_start
@@ -21,9 +26,13 @@ startup_message:
.byte $1C,$B4 .byte $1C,$B4
.byte $9E,$B5 .byte $9E,$B5
.byte $1E,$A1 .byte $1E,$A1
;; <RVS><WHITE>MEGA<NORMAL>BASIC ;; <RVS><WHITE>MEGA<NORMAL>BASIC\r\r
.byte $12,$05,$4D,$45,$47,$41,$92,$42,$41,$53,$49,$43 .byte $12,$05,$4D,$45,$47,$41,$92
;; carriage return at end .byte $42,$41,$53,$49,$43
.byte $0D .byte $20,$56,$32,$2e,$30,$2e,$30
.byte $0D,$0D
;; XXX - Hard code in the 38911 for now
.byte $33,$38,$39,$31,$31,$20
.byte 0 .byte 0
+10
View File
@@ -43,6 +43,7 @@ char *error_list[]={
"VERIFYING", "VERIFYING",
"SAVING", "SAVING",
"ERROR", // #33 "ERROR", // #33
"BYTES FREE.\r\r", // #34
NULL}; NULL};
// Token $FF is end of message, so we can have only 255 unique words // Token $FF is end of message, so we can have only 255 unique words
@@ -222,6 +223,15 @@ int main(void)
fprintf(stderr,"Space saving = %d bytes\n",raw_size-packed_len-token_count); fprintf(stderr,"Space saving = %d bytes\n",raw_size-packed_len-token_count);
if (packed_len>255) {
fprintf(stderr,"ERROR: packed_len>255\n");
exit(-1);
}
if (token_count>255) {
fprintf(stderr,"ERROR: token_count>255\n");
exit(-1);
}
printf("packed_message_chars:\n"); printf("packed_message_chars:\n");
for(int i=0;i<char_max;i++) for(int i=0;i<char_max;i++)
printf("\t.byte $%02X ; '%c'\n",char_freqs[i].c,char_freqs[i].c); printf("\t.byte $%02X ; '%c'\n",char_freqs[i].c,char_freqs[i].c);