From 3b615b774e9c6bd7a48a213686b80a8e5b31d693 Mon Sep 17 00:00:00 2001 From: jonnosan Date: Sun, 5 Jul 2009 10:42:48 +0000 Subject: [PATCH] git-svn-id: http://svn.code.sf.net/p/netboot65/code@151 93682198-c243-4bdb-bd91-e943c89aac3b --- client/test/test_gopher.s | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/client/test/test_gopher.s b/client/test/test_gopher.s index e443e03..951f88d 100644 --- a/client/test/test_gopher.s +++ b/client/test/test_gopher.s @@ -213,7 +213,10 @@ show_buffer: beq @go_prev_page cmp #KEYCODE_F2 beq @show_history - + cmp #KEYCODE_LEFT + beq @back_in_history + cmp #KEYCODE_F3 + beq @back_in_history cmp #KEYCODE_ABORT beq @quit @@ -232,6 +235,14 @@ show_buffer: @not_a_resource: jsr print_hex jmp @get_keypress +@back_in_history: + ldx current_resource_history_entry + dex + beq @get_keypress ;if we were already at start of history, can't go back any further + stx current_resource_history_entry + txa + jsr load_resource_from_history + jmp show_buffer @show_history: jmp show_history @go_next_page: @@ -326,6 +337,19 @@ show_resource: @end_of_port: @done: ;add this to the resource history + lda current_resource_history_entry + cmp #RESOURCE_HISTORY_ENTRIES + bne @dont_shuffle_down + ldax #resource_history + stax copy_dest + inx ;one page higher up + stax copy_src + ldx #(RESOURCE_HISTORY_ENTRIES-1) + lda #$00 + jsr copymem + dec current_resource_history_entry + +@dont_shuffle_down: ldax #current_resource stax copy_src lda #