mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-08-07 07:29:03 +00:00
menu now works with more than 128 items, also more efficient use of memory, and ability to jump to a particular letter
git-svn-id: http://svn.code.sf.net/p/netboot65/code@36 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
121cf18457
commit
d8a871b0ad
@ -10,6 +10,7 @@ first_option_this_page: .res 2
|
|||||||
options_shown_this_page: .res 1
|
options_shown_this_page: .res 1
|
||||||
options_table_pointer: .res 2
|
options_table_pointer: .res 2
|
||||||
jump_to_prefix: .res 1
|
jump_to_prefix: .res 1
|
||||||
|
last_page_flag: .res 1
|
||||||
.code
|
.code
|
||||||
|
|
||||||
|
|
||||||
@ -98,7 +99,8 @@ select_option_from_menu:
|
|||||||
sta current_option
|
sta current_option
|
||||||
lda first_option_this_page+1
|
lda first_option_this_page+1
|
||||||
sta current_option+1
|
sta current_option+1
|
||||||
|
lda #0
|
||||||
|
sta last_page_flag
|
||||||
|
|
||||||
jsr @move_to_current_option
|
jsr @move_to_current_option
|
||||||
|
|
||||||
@ -168,6 +170,7 @@ select_option_from_menu:
|
|||||||
lda current_option+1
|
lda current_option+1
|
||||||
cmp number_of_options+1
|
cmp number_of_options+1
|
||||||
bne :+
|
bne :+
|
||||||
|
inc last_page_flag
|
||||||
jmp @print_instructions_and_get_keypress
|
jmp @print_instructions_and_get_keypress
|
||||||
:
|
:
|
||||||
inc options_shown_this_page
|
inc options_shown_this_page
|
||||||
@ -266,25 +269,17 @@ select_option_from_menu:
|
|||||||
|
|
||||||
@forward_one_page:
|
@forward_one_page:
|
||||||
clc
|
clc
|
||||||
|
lda last_page_flag
|
||||||
|
beq :+
|
||||||
|
@back_to_first_page:
|
||||||
|
jmp @display_first_page_of_options
|
||||||
|
:
|
||||||
lda first_option_this_page
|
lda first_option_this_page
|
||||||
adc #OPTIONS_PER_PAGE
|
adc #OPTIONS_PER_PAGE
|
||||||
sta first_option_this_page
|
sta first_option_this_page
|
||||||
bcc :+
|
bcc :+
|
||||||
inc first_option_this_page+1
|
inc first_option_this_page+1
|
||||||
:
|
:
|
||||||
lda first_option_this_page+1
|
|
||||||
cmp number_of_options+1
|
|
||||||
beq :+
|
|
||||||
bcc @back_to_first_page
|
|
||||||
bcs @not_last_page_of_options
|
|
||||||
:
|
|
||||||
lda first_option_this_page
|
|
||||||
cmp number_of_options
|
|
||||||
bcc @not_last_page_of_options
|
|
||||||
|
|
||||||
@back_to_first_page:
|
|
||||||
jmp @display_first_page_of_options
|
|
||||||
@not_last_page_of_options:
|
|
||||||
|
|
||||||
jmp @print_current_page
|
jmp @print_current_page
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user