]> cloudbase.mooo.com Git - ddt180.git/commitdiff
cmd_R: don't allow loading over ddtz address space, but everywhere else.
authorLeo C <erbl259-lmu@yahoo.de>
Thu, 6 Jun 2019 14:33:15 +0000 (16:33 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Thu, 6 Jun 2019 14:33:15 +0000 (16:33 +0200)
ddt180.z80

index 20d7a141de444ea23dd9862e77160fdf1408b868..adbe46fa526e3722f56db5467c68ca9c32fb8ee3 100644 (file)
@@ -35,8 +35,8 @@ bitmap_size   equ     (prog_size+7)/8
 ;-------------------------------------------------------------------------------\r
 \r
        cseg\r
 ;-------------------------------------------------------------------------------\r
 \r
        cseg\r
-start::\r
-ddtz_base::\r
+start:\r
+ddtz_base:\r
        jr reloc\r
        nop\r
 l0003h:\r
        jr reloc\r
        nop\r
 l0003h:\r
@@ -136,7 +136,7 @@ reloc_next:
 ;-------------------------------------------------------------------------------\r
 \r
 \r
 ;-------------------------------------------------------------------------------\r
 \r
 \r
-init::\r
+init:\r
        LD      SP,stack\r
 \r
     if CPM\r
        LD      SP,stack\r
 \r
     if CPM\r
@@ -466,7 +466,7 @@ cswr_wait:
 \r
 ;-------------------------------------------------------------------------------\r
 \r
 \r
 ;-------------------------------------------------------------------------------\r
 \r
-CMDTAB::\r
+CMDTAB:\r
 ;      dw      ERROR ;cmd_@    ;examine/substitute the displacement register @\r
 ;      dw      ERROR ;cmd_A    ;Assemble\r
        dw      cmd_B           ;Breakpoints display/set/clear\r
 ;      dw      ERROR ;cmd_@    ;examine/substitute the displacement register @\r
 ;      dw      ERROR ;cmd_A    ;Assemble\r
        dw      cmd_B           ;Breakpoints display/set/clear\r
@@ -499,7 +499,7 @@ ERROR:
        call    pstr_inl\r
        dc      '?',CR,LF\r
        ;fall thru\r
        call    pstr_inl\r
        dc      '?',CR,LF\r
        ;fall thru\r
-mainloop::\r
+mainloop:\r
        ld sp,stack\r
        ld hl,(reg.pc)\r
        call bp_clr_temporary\r
        ld sp,stack\r
        ld hl,(reg.pc)\r
        call bp_clr_temporary\r
@@ -2635,12 +2635,14 @@ i.getchar:
 i.storebyte:\r
        push af\r
        push de\r
 i.storebyte:\r
        push af\r
        push de\r
-       ld de,TPA               ;lowest allowed load address\r
+       ld de,ddtz_base         ;don't load over ddtz\r
        call cp_hl_de\r
        call cp_hl_de\r
-       jr c,error2\r
-       ld de,(BDOS+1)          ;highest allowed load address\r
+       jr nc,ist_1\r
+\r
+       ld de,ddtz_end+bitmap_size-1\r
        call cp_hl_de\r
        jr nc,error2\r
        call cp_hl_de\r
        jr nc,error2\r
+ist_1:\r
        ld de,(high_load)\r
        call cp_hl_de\r
        jr c,l1157h\r
        ld de,(high_load)\r
        call cp_hl_de\r
        jr c,l1157h\r
@@ -4004,7 +4006,7 @@ pbl_loop_adr:
 \r
 ;-------------------------------------------------------------------------------\r
 \r
 \r
 ;-------------------------------------------------------------------------------\r
 \r
-conbuf::\r
+conbuf:\r
        ds      CONBUF_SIZE+1\r
 \r
 ;-------------------------------------------------------------------------------\r
        ds      CONBUF_SIZE+1\r
 \r
 ;-------------------------------------------------------------------------------\r
@@ -4012,7 +4014,7 @@ conbuf::
        rept    (STACK_SIZE+3)/4\r
        db      0deh,0adh,0beh,0efh\r
        endm\r
        rept    (STACK_SIZE+3)/4\r
        db      0deh,0adh,0beh,0efh\r
        endm\r
-stack::\r
+stack:\r
 reg.l2:        db      000h\r
 reg.h2:        db      000h\r
 reg.e2:        db      000h\r
 reg.l2:        db      000h\r
 reg.h2:        db      000h\r
 reg.e2:        db      000h\r
@@ -4040,12 +4042,12 @@ reg.iff:
 reg.pc:        dw      TPA\r
 \r
 cmd_rpt:dw     mainloop\r
 reg.pc:        dw      TPA\r
 \r
 cmd_rpt:dw     mainloop\r
-\r
+       db      0ffh,0ffh,0ffh\r
 ;-------------------------------------------------------------------------------\r
 \r
 ddtz_size      equ     $-ddtz_base\r
 prog_size      equ     $-start\r
 ;-------------------------------------------------------------------------------\r
 \r
 ddtz_size      equ     $-ddtz_base\r
 prog_size      equ     $-start\r
-ddtz_end::\r
+ddtz_end:\r
 \r
 ;-------------------------------------------------------------------------------\r
 \r
 \r
 ;-------------------------------------------------------------------------------\r
 \r