Skip to content

Commit

Permalink
Bugfix: .nxtp dot command crashed if you omitted the -z timezone para…
Browse files Browse the repository at this point in the history
…meter.
  • Loading branch information
Threetwosevensixseven committed Dec 25, 2019
1 parent cdbd589 commit 8290a8d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/src/core/NxtpServer/obj
/src/core/NxtpServer/Publish
/src/asm/ZeusBak
/dot/NXTP.piz
Binary file modified dot/NXTP
Binary file not shown.
12 changes: 8 additions & 4 deletions src/asm/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ optionsize 5
CSpect optionbool 15, -15, "CSpect", false ; Option in Zeus GUI to launch CSpect
RealESP optionbool 80, -15, "Real ESP", true ; Launch CSpect with physical ESP in USB adaptor
UploadNext optionbool 160, -15, "Next", false ; Copy dot command to Next FlashAir card
ErrDebug optionbool 212, -15, "Debug", true ; Print errors onscreen and halt instead of returning to BASIC
ErrDebug optionbool 212, -15, "Debug", false ; Print errors onscreen and halt instead of returning to BASIC

org $2000 ; Dot commands always start at $2000.
Start: jp Main ; Entry point, jump to start of code.
Expand Down Expand Up @@ -123,8 +123,9 @@ Connect:
ErrorIfCarry(Errors.ESPConn) ; Raise ESP error if no response
//PrintMsg(Messages.Connected)
PrintAnyZone:
ld a, (ZoneStart)
or a
ld hl, (ZoneStart)
ld a, h
or l
jp z, PrintNoZone
PrintHasZone: PrintMsg(Messages.UsingTZ)
PrintBuffer(ZoneStart, ZoneLen)
Expand All @@ -142,8 +143,11 @@ MakeRequest:
inc hl
ex de, hl
ld hl, (ZoneStart) ; Copy zone
ld a, h
or l
jp z, RequestNoZone
ldir
ld hl, (ZoneLen) ; Calculate request len (inc checksum)
RequestNoZone: ld hl, (ZoneLen) ; Calculate request len (inc checksum)
AddHL(3)
ld (RequestLen), hl
dec hl
Expand Down
20 changes: 10 additions & 10 deletions src/asm/version.asm
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
; version.asm
;
; Auto-generated by ZXVersion.exe
; On 25 Dec 2019 at 12:49
; On 25 Dec 2019 at 14:36

BuildNo macro()
db "36"
db "39"
mend

BuildNoValue equ "36"
BuildNoWidth equ 0 + FW3 + FW6
BuildNoValue equ "39"
BuildNoWidth equ 0 + FW3 + FW9



Expand All @@ -22,17 +22,17 @@ BuildDateWidth equ 0 + FW2 + FW5 + FWSpace + FWD + FWe + FWc + FWSpace


BuildTime macro()
db "12:49"
db "14:36"
mend

BuildTimeValue equ "12:49"
BuildTimeWidth equ 0 + FW1 + FW2 + FWColon + FW4 + FW9
BuildTimeValue equ "14:36"
BuildTimeWidth equ 0 + FW1 + FW4 + FWColon + FW3 + FW6



BuildTimeSecs macro()
db "12:49:31"
db "14:36:32"
mend

BuildTimeSecsValue equ "12:49:31"
BuildTimeSecsWidth equ 0 + FW1 + FW2 + FWColon + FW4 + FW9 + FWColon + FW3 + FW1
BuildTimeSecsValue equ "14:36:32"
BuildTimeSecsWidth equ 0 + FW1 + FW4 + FWColon + FW3 + FW6 + FWColon + FW3 + FW2

0 comments on commit 8290a8d

Please sign in to comment.