diff --git a/Copy.asm b/Copy.asm index e6a1626..294eeeb 100644 --- a/Copy.asm +++ b/Copy.asm @@ -281,8 +281,8 @@ EXITCODE+1: LD B,0 ;;;;;;;;;;;;;;;;;;;;;;;;; ; ; -RD_ERROR: CALL PRINT_ERROR - ; +RD_ERROR: ;CALL PRINT_ERROR + LD (EXITCODE),A LD HL,READ_ERR_STR ; LD C,Dss.PChars ; RST ToDSS @@ -290,8 +290,8 @@ RD_ERROR: CALL PRINT_ERROR ;;;;;;;;;;;;;;;;;;;;;;;;; ; ; -WR_ERROR: CALL PRINT_ERROR - ; +WR_ERROR: ;CALL PRINT_ERROR + LD (EXITCODE),A LD HL,WRITE_ERR_STR ; LD C,Dss.PChars ; RST ToDSS @@ -305,39 +305,39 @@ WR_ERROR: CALL PRINT_ERROR ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; -PRINT_ERROR: LD H,0 - LD L,A - LD (EXITCODE),A - LD DE,READ_ERR_STR.errNum - ;CALL hex2dec_ascii_16bit -; вход: hl=число, de=буфер -hex2dec_ascii_16bit: -.n100: LD IX,MemBuffer.tmp1 - RES 7,(ix+0) -.skip2: LD BC,100 - CALL .num16 - ; -.decim: LD BC,10 - CALL .num16 - LD A,L - ADD A,"0" - JR .num16_exit - ; -.num16: LD A,'0'-1 - AND A - INC A - SBC HL,BC - JR NC,$-3 ;!FIXIT $ - ADD HL,BC - CP "0" - JR Z,$+6 ;!FIXIT $ - SET 7,(ix+0) - BIT 7,(ix+0) - RET Z -.num16_exit: - LD (DE),A ; сохр. в буфере - INC DE - RET +; PRINT_ERROR: LD H,0 +; LD L,A +; LD (EXITCODE),A +; LD DE,READ_ERR_STR.errNum +; ;CALL hex2dec_ascii_16bit +; ; вход: hl=число, de=буфер +; hex2dec_ascii_16bit: +; .n100: LD IX,MemBuffer.tmp1 +; RES 7,(ix+0) +; .skip2: LD BC,100 +; CALL .num16 +; ; +; .decim: LD BC,10 +; CALL .num16 +; LD A,L +; ADD A,"0" +; JR .num16_exit +; ; +; .num16: LD A,'0'-1 +; AND A +; INC A +; SBC HL,BC +; JR NC,$-3 ;!FIXIT $ +; ADD HL,BC +; CP "0" +; JR Z,$+6 ;!FIXIT $ +; SET 7,(ix+0) +; BIT 7,(ix+0) +; RET Z +; .num16_exit: +; LD (DE),A ; сохр. в буфере +; INC DE +; RET ;;;;;;;;;;;;;;;;;;;;;;;;; ; ; @@ -345,10 +345,10 @@ DONE_STR: DB "File copied",#0D,#0A,#00 NO_MEM_STR: DB "No free memory",#0D,#0A,#00 SOPEN_ERR_STR: DB "Can't open source file",#0D,#0A,#00 DOPEN_ERR_STR: DB "Can't open destination file",#0D,#0A,#00 -READ_ERR_STR: DB "Reading error " -.errNum: DB "00",#0D,#0A,#00 -WRITE_ERR_STR: DB "Writing error " -.errNum: DB "00 ",#0D,#0A,#00 +READ_ERR_STR: DB "Reading error",#0D,#0A,#00 +;.errNum: DB "00 ",#0D,#0A,#00 +WRITE_ERR_STR: DB "Writing error",#0D,#0A,#00 +;.errNum: DB "00 ",#0D,#0A,#00 ; diff --git a/Shared_Includes b/Shared_Includes index be5eed4..a0e68ce 160000 --- a/Shared_Includes +++ b/Shared_Includes @@ -1 +1 @@ -Subproject commit be5eed466fa1c0e442b828a42ffc1b9abda23ac9 +Subproject commit a0e68ce3a19bd47537585e49bfbf5e45fab197a1