mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-05-28 20:41:33 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@31 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
b2603e65dc
commit
fafc7b31e5
|
@ -39,10 +39,12 @@
|
|||
.import __CODE_RUN__
|
||||
.import __CODE_SIZE__
|
||||
|
||||
.segment "PAGE3"
|
||||
;.segment "PAGE3"
|
||||
;disable_language_card: .res 3
|
||||
;bin_file_jmp: .res 3
|
||||
|
||||
disable_language_card: .res 3
|
||||
bin_file_jmp: .res 3
|
||||
disable_language_card = $101
|
||||
bin_file_jmp = $104
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ current_option: .res 1
|
|||
first_option_this_page: .res 1
|
||||
options_shown_this_page: .res 1
|
||||
|
||||
option_description_pointers: .res 256 ;table of addresses of up to 128 filenames
|
||||
option_description_pointers: .res 256 ;table of addresses of up to 128 options
|
||||
|
||||
.code
|
||||
|
||||
|
@ -32,7 +32,7 @@ select_option_from_menu:
|
|||
sta option_description_pointers+1,y
|
||||
iny
|
||||
iny
|
||||
|
||||
beq @found_last_option_string ;if we overflow y, then stop scanning options
|
||||
inc number_of_options
|
||||
|
||||
@scan_for_null_byte:
|
||||
|
@ -64,6 +64,14 @@ select_option_from_menu:
|
|||
jsr cls
|
||||
ldax #select_from_following_options
|
||||
jsr print
|
||||
|
||||
lda number_of_options
|
||||
cmp #OPTIONS_PER_PAGE
|
||||
bcc :+
|
||||
ldax #arrow_keys_to_move
|
||||
jsr print
|
||||
|
||||
:
|
||||
lda #'('
|
||||
jsr print_a
|
||||
lda #'$'
|
||||
|
@ -75,7 +83,7 @@ select_option_from_menu:
|
|||
jsr print_hex
|
||||
lda #'/'
|
||||
jsr print_a
|
||||
lda #'$'
|
||||
lda #'$'
|
||||
jsr print_a
|
||||
lda number_of_options
|
||||
jsr print_hex
|
||||
|
@ -187,4 +195,5 @@ select_option_from_menu:
|
|||
; stax temp_filename_ptr
|
||||
|
||||
.rodata
|
||||
select_from_following_options: .byte "SELECT ONE OF THE FOLLOWING OPTIONS:",13,0
|
||||
select_from_following_options: .byte "SELECT ONE OF THE FOLLOWING OPTIONS:",13,0
|
||||
arrow_keys_to_move: .byte "ARROW KEYS NAVIGATE BETWEEN MENU PAGES",13,0
|
30
server/bin/tftp_only_server.rb
Normal file
30
server/bin/tftp_only_server.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# tftp only server
|
||||
#
|
||||
# Jonno Downes (jonno@jamtronix.com) - January, 2009
|
||||
#
|
||||
#
|
||||
|
||||
Thread.abort_on_exception=true
|
||||
|
||||
def log_msg(msg)
|
||||
puts "#{Time.now.strftime("%Y-%m-%d %H:%M:%S")} #{msg}"
|
||||
end
|
||||
|
||||
lib_path=File.expand_path(File.dirname(__FILE__)+'/../lib')
|
||||
$:.unshift(lib_path) unless $:.include?(lib_path)
|
||||
require 'tftp_server'
|
||||
|
||||
bootfile_dir=File.expand_path(File.dirname(__FILE__)+'/../boot')
|
||||
tftp_server=Netboot65TFTPServer.new(bootfile_dir)
|
||||
tftp_server.start
|
||||
|
||||
begin
|
||||
loop do
|
||||
sleep(1) #wake up every second to get keyboard input, so we break on ^C
|
||||
end
|
||||
rescue Interrupt
|
||||
log_msg "got interrupt signal - shutting down"
|
||||
end
|
||||
tftp_server.shutdown
|
||||
log_msg "shut down complete."
|
Loading…
Reference in New Issue
Block a user