From a977e2d1d24f72542c886f267a754ee6efa5ac2d Mon Sep 17 00:00:00 2001 From: nihirash Date: Sat, 20 Jul 2019 22:45:23 +0300 Subject: [PATCH] search queries supported --- index.pg | 12 ++++++------ render.asm | 41 ++++++++++++++++++++++++++++++++++++++++- utils.asm | 7 +++++++ 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/index.pg b/index.pg index 7d4ff1f..4e7b498 100644 --- a/index.pg +++ b/index.pg @@ -1,19 +1,19 @@ -iWelcome to uGophy v.0.4 fake (NULL) 0 +iWelcome to uGophy v.0.5 fake (NULL) 0 +i fake (NULL) 0 i(c) 2019 Alexander Sharikhin aka Nihirash fake (NULL) 0 i fake (NULL) 0 -iVersion 0.4 - Timex screen version fake (NULL) 0 +iVersion 0.5 - User input on gopher pages supported fake (NULL) 0 +i fake (NULL) 0 iThis version works on 14MHz turbo mode fake (NULL) 0 iIf you using old core - please update. fake (NULL) 0 i fake (NULL) 0 -iSCR files just showing on screen, no downloads for it now fake (NULL) 0 -i fake (NULL) 0 iNavigation keys: fake (NULL) 0 iQ - Up fake (NULL) 0 iA - Down fake (NULL) 0 -iB - History back fake (NULL) 0 +iB - Hisotry back fake (NULL) 0 io - Enter server name to browse(using port 70) fake (NULL) 0 iEnter - Visit page/Download file fake (NULL) 0 i fake (NULL) 0 iBookmarks: fake (NULL) 0 1Nihirash.net - BIG collection of games and nihirash's things / nihirash.net 70 -1i-LogOut.cz - Gopher phlog aggregator and other things / i-logout.cz 70 \ No newline at end of file +1Logout128's gopherspace. Phlog aggregator are there / i-logout.cz 70 diff --git a/render.asm b/render.asm index d39255f..c47286f 100644 --- a/render.asm +++ b/render.asm @@ -116,8 +116,37 @@ selectItem: cp '9' jp z, downFl + cp '7' + jr z, userInput + ret +userInput: + call cleanIBuff + call input + + call extractInfo + ld hl, file_buffer + call findEnd + ld a, 9 + ld (hl), a + inc hl + ex hl, de + ld hl, iBuff + ld bc, 64 + ldir + + ld hl, hist + ld de, path + ld bc, 322 + ldir + + ld hl, server_buffer + ld de, file_buffer + ld bc, port_buffer + call openPage + jp showPage + downPg: push af call extractInfo @@ -254,8 +283,17 @@ showType: cp '0' jr z, showTypeText + cp '7' + jr z, showTypeInput + jr showTypeUnknown +showTypeInput: + ld hl, type_inpt + call showTypePrint + call showURI + ret + showTypeText: ld hl, type_text call showTypePrint @@ -443,10 +481,11 @@ show_offset db 0 display $ cursor_pos db 1 -head db " UGophy - ZX-UNO Gopher client v. 0.4 (c) Alexander Sharikhin", 13,0 +head db " UGophy - ZX-UNO Gopher client v. 0.5 (c) Alexander Sharikhin", 13,0 cleanLine db " ",0 +type_inpt db "User input: ", 0 type_text db "Text file: ", 0 type_info db "Information ", 0 type_page db "Page: ", 0 diff --git a/utils.asm b/utils.asm index 1290fde..df8769b 100644 --- a/utils.asm +++ b/utils.asm @@ -109,6 +109,13 @@ SkipWhitespace: inc hl jr SkipWhitespace +findEnd: + ld a,(hl) + and a + ret z + inc hl + jr findEnd + ;;;;;;;;;;;;;;;;;;;;;;;; ; Binary to decimal stuff