tapeio and symNotepad updates
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
;
|
;
|
||||||
; Wayne Parham (wayne@parhamdata.com)
|
; Wayne Parham (wayne@parhamdata.com)
|
||||||
;
|
;
|
||||||
; int loadt (int id);
|
; int __fastcall__ loadt (unsigned char id);
|
||||||
; int dumpt (int id, int start_addr, int end_addr);
|
; int __fastcall__ dumpt (unsigned char id, void* start_addr, void* end_addr);
|
||||||
;
|
;
|
||||||
|
|
||||||
.include "sym1.inc"
|
.include "sym1.inc"
|
||||||
|
|
||||||
.import popax, return0, return1
|
.import popa, popax, return0, return1
|
||||||
|
|
||||||
.export _loadt, _dumpt
|
.export _loadt, _dumpt
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ error: jmp return1 ; or 1 if not
|
|||||||
jsr popax
|
jsr popax
|
||||||
sta P2L ; Start address
|
sta P2L ; Start address
|
||||||
stx P2H
|
stx P2H
|
||||||
jsr popax
|
jsr popa
|
||||||
sta P1L ; Tape Record ID
|
sta P1L ; Tape Record ID
|
||||||
ldx #$00
|
ldx #$00
|
||||||
stx P1H
|
stx P1H
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void main(void) {
|
|||||||
l++;
|
l++;
|
||||||
tapio[l] = 0x00;
|
tapio[l] = 0x00;
|
||||||
puts( "Saving to tape." );
|
puts( "Saving to tape." );
|
||||||
error = dumpt( 'N', (int) tapio, (int) tapio+p );
|
error = dumpt( 'N', tapio, tapio+p );
|
||||||
if( error ) {
|
if( error ) {
|
||||||
puts( "\nTape error." );
|
puts( "\nTape error." );
|
||||||
}
|
}
|
||||||
@@ -124,9 +124,6 @@ void main(void) {
|
|||||||
puts( "===================== Sym-1 Notepad ====================\n" );
|
puts( "===================== Sym-1 Notepad ====================\n" );
|
||||||
for( l = 0; l <= p; l++ ) {
|
for( l = 0; l <= p; l++ ) {
|
||||||
putchar( buffer[l] );
|
putchar( buffer[l] );
|
||||||
if( buffer[l] == '\r' ) {
|
|
||||||
putchar( '\n' );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( c == 0x0C ) { // Load
|
else if( c == 0x0C ) { // Load
|
||||||
@@ -155,9 +152,6 @@ void main(void) {
|
|||||||
|
|
||||||
for( l = 0; l <= p; l++ ) {
|
for( l = 0; l <= p; l++ ) {
|
||||||
putchar( buffer[l] );
|
putchar( buffer[l] );
|
||||||
if( buffer[l] == '\r' ) {
|
|
||||||
putchar( '\n' );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,11 +174,10 @@ void main(void) {
|
|||||||
puts( "Buffer full." );
|
puts( "Buffer full." );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if( c == '\r' ) {
|
if( c == '\n' ) {
|
||||||
putchar( '\n' );
|
putchar( '\n' );
|
||||||
}
|
}
|
||||||
buffer[p] = c;
|
buffer[p] = c;
|
||||||
putchar( c );
|
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user