license
The cross compiler

include ./xcom.html  \ link
	

Change these flags to get what you want all cards are support under one source tree. Its too hard maintaining seperate version.


	
	HEX  
	\ H 5307 mask
	FALSE     EQU #BCM550h
	\ J 5307 mask
	TRUE    EQU #BCM550j
	FALSE    EQU #BVP5502
	FALSE    EQU #BVP5501
	
	FALSE    EQU #BVP5552
	FALSE    EQU #BVP5551


	TRUE     EQU #USE_MAC
	
	\ add floating point package
	\ The H mask doesn't support the fractional mult.
	#BCM550h not [IF]
		TRUE     EQU #FLOAT
	[ELSE]
		FALSE EQU #FLOAT
	[THEN]
	
\ based on card type define type of processor
#BCM550h #BCM550j + #BVP5502 + #BVP5501 + [IF]
	TRUE  EQU #5307
	FALSE EQU #5407
	assembler
	#5300 !CPU
	HOST
[THEN]

#BVP5552 #BVP5551 + [IF]
	FALSE EQU #5307
	TRUE EQU #5407
	assembler
	#5400 !CPU
	HOST
[THEN]

\ assumes SDRAM starts at $10000000 
#BCM550h #BCM550j + #BVP5502 + #BVP5501 + #BVP5552 + #BVP5551 + [IF]
	include ./setup_xcom.html \ link
[THEN]

We can now add code to image



include ./constants.html

#BCM550h [IF]
	include ./bcm550h_constants.html \ link
[THEN]

#BCM550j [IF]
	include ./bcm550j_constants.html \ link
[THEN]

#BVP5502 [IF]
	include ./bvp5502_constants.html \ link
[THEN]

#BVP5501 [IF]
	include ./bvp5501_constants.html \ link
[THEN]

#BVP5551 [IF]
	include ./bvp5551_constants.html \ link
[THEN]

#BVP5552 [IF]
	include ./bvp5552_constants.html \ link
[THEN]

	
	\ target dictionary pointer, see dictionary_here
	_#dictionary_start 'dictionary !
	\ base address of the dictioanry image area
	\ used in XCOM
	_#dictionary_start _dictionary0 !
    
    
		

Run time action for various words.


	include ./_do_code.html \ link
	include ./ansi_code_words.html \ link
	include ./code_words.html \ link
     
		

load rest of cross compiler

The cross compiler needs to know where some of the words are in the kernel. There are two ways of dealing with this, allow forward referencing in the cross compiler, or define the words and load the rest of the cross compiler. This version uses the latter approach. Can't argue in favour of either solution.


	include ./xcomp2.4th \ link
	include ./ansi_code_strict_html.html \ link
	include ./start_application_dict.html \ link
	include ./colon_words_used_by_ansi.html \ link
	include ./ansi_colon_words.html \ link
	include ./colon_words.html \ link
	include ./word_head.html \ link
	include ./initial_abort.html \ link
	include ./link_lists.html \ link
	include ./user_variables.html \ link

#BCM550h #BCM550j + [IF]
	fast_here CONSTANT _%system_stack HOST _#system_stack_length fast_allot
	fast_here EQU _%system_stack_end 
	ram_variable _%fault_lp
	ram_variable _%fault_u
	ram_variable _%fault_stack _#system_stack_length ram_allot
[THEN]
\ #### temp #BCM552 should be static
\ Static may not be best.
 #BVP5502 #BVP5501 + #BVP5552 +  #BVP5551 +  [IF]
	ram_here CONSTANT _%system_stack HOST _#system_stack_length ram_allot
	ram_here EQU _%system_stack_end 
	ram_variable _%fault_lp
	ram_variable _%fault_u
	ram_variable _%fault_stack _#system_stack_length ram_allot
[THEN]
	

Fast memory defined before this is not cleared on startup.


		
	fast_here CONSTANT _%fast_clear_start

	 

dynamic ram memory defined before this is not cleared on startup.

 
	
	ram_here  CONSTANT _%ram_clear_start

#BVP5502 #BVP5501 + #BVP5552 + #BVP5551 + [IF]
	 

Static memory defined before this is not cleared on startup.

 
	static_here CONSTANT _%static_clear_start
[THEN]


   
	 

The kernel checksum is contained in prom, the application in flash. The application will only run if it was compiled on the same kernel. To this end the kernel checksum is saved with the application. Before the application is loaded the current kernel checksum is compare with the saved checksum and tha application loaded if the two checksums are the same.

An offset is used to find the checksum in the flashed application image.

 
    dictionary_here _#dictionary_start  - CONSTANT _#kernel_checksum_offset   
    dictionary_variable _%kernel_checksum ( value copied when promming)


	include ./user_using_words.html \ link
	include ./memory_allocation.html \ link
	include ./vocabulary.html \ link
	include ./checksum.html \ link
	include ./find.html \ link
	include ./xwords.html \ link
	include ./task_loops.html \ link

#BCM550j #BCM550h + [IF]
	include ./panic0.html \ link
[THEN]

#BVP5502 #BVP5501 + #BVP5552 + #BVP5551 + [IF]
	include ./panic1.html \ link
[THEN]

	include ./heap_control.html \ link
	include ./words_using_heap.html \ link
	include ./wordlists.html \ link
	 

sort out the root voacubulary. The minimum search order is SET-ORDER and FORTH-WORDLIST. To get into forth the code would be FORTH-WORDLIST 1 SET-ORDER We will add the word FORTH.

 
	target_also &root 
	target_definitions

	: FORTH  FORTH ;
	: FORTH-WORDLIST FORTH-WORDLIST ;
	: SET-ORDER SET-ORDER ;	

	target_previous_definitions
	target_previous

    
  
 
  
	include ./cache_managment.html \ link
	include ./basic_io.html \ link
	include ./number_output.html \ link
	include ./abort.html \ link
	include ./ass.html \ link
	include ./word.html \ link
	include ./more_ansi_colon_words.html \ link
	include ./compile.html \ link
	include ./string_literals.html \ link
	include ./number.html \ link
	include ./random.html \ link

	#FLOAT [IF]
		include ./float.html \ link
	[THEN]
	include ./q_numbers.html \ link
	include ./version.html \ link        
	include ./more_forth.html \ link    
	include ./struct.html \ link
	include ./objects.html \ link
	include ./terminal_class.html \ link
	include ./linked_object.html \ link
	include ./string_class.html \ link

	include ./parented_object.html \ link
	include ./inode.html \ link
	include ./io_common.html \ link
	include ./root.html \ link
	include ./file_class.html \ link
	include ./input_output.html \ link
	include ./ws60.html \ link
	include ./prompt.html \ link
	include ./if_then_else.html \ link
	include ./htmltags.4th \ difficult to display; defines HTML tags. 
	include ./quit_interpret_etc.html \ link
	include ./queue.html \ link
	include ./flash.html \ link
	include ./local_variables.html \ link
	include ./system_rte.html \ link
	include ./interrupt_colon.html \ link
	.S .( after ./interrupt_colon)
	include ./tyx.html \ link
	.S .( after ./tyx)
	include ./config.html \ link
	.S .( after ./config.html)
	include ./real_time_clock.html \ link
	.S .( after ./real_time_clock)
	include ./editor.html \ link
	.S .( after ./editor)
	include ./date1900.html \ link
	.S .( ./date)
	include ./form.html \ link
\	include ./message.html  
	include ./_cvs_decode.html \ link
	.S .( ./_cvs_decode)
\ works but is of little use, intertask is done with tube
\	include ./pipe.html \ link

#BCM550h #BCM550j + #BVP5502 +  #BVP5552 + #BVP5551 +  [IF]
	include ./dual_port_memory.html \ link
[THEN]

#BVP5502 #BVP5501 +  [IF]
	include ./bank_memory.html \ link
[THEN]

\ same structure as rtidual port
#BVP5552 [IF]
	include ./bvp5552bank_memory.html
[THEN]

	include ./tube.html \ link
.S .( after ./tube.html)
#BCM550h #BCM550j +  #BVP5502 +  #BVP5552 + #BVP5551 + [IF] 
	include ./port_tube.html \ link     
[THEN]

	include ./task_stuff.html \ link
	include ./marker.html \ link  
	include ./print_system_data.html \ link  
	include ./words.html \ link
	include ./operator_task_table.html \ link    
	include ./show.html \ link
	include ./fault_data.html \ link

	include ./watchdog.html \ link    
	include ./traps.html \ link	

#BCM550h #BCM550j + [IF]    
    include ./cards.html \ link
[THEN]

	include ./printing.html \ link
	
#BCM550h #BCM550j + [IF]
    include ./rlogon.html \ link
[THEN]

		: get_filecode ( --code)
			this :@name checksum 
		;

	include ./ilan_temp.html \ link    
    
#BCM550h #BCM550j + [IF]
 	include ./rti1000_interrupt.html \ link
[THEN]

#BCM550h #BCM550j + [IF]
	include ./digital_interrupt.html \ link
[THEN]

#BCM550h #BCM550j + #BVP5502 + #BVP5552 + #BVP5551 + [IF]
	include ./rti.html \ link
[THEN]

\ #### temp
\ getting file services through the bank memory between CPUI and CPUII
\ #BVP5501 [IF]
\	include ./bank.html \ link
\	include ./bank_tube.html \ link
\ [THEN]


\ #BCM550 [IF]
\    include ./file_server.html \ link
\ [THEN]

#BVP5552  [IF]
    include ./bank_bvp5552_code.html \ link
    include ./bank_bvp5552_logon.html \ link
[THEN]
#BVP5502  [IF]
    include ./bank_bvp5502_code.html \ link
    include ./bank_logon.html \ link
[THEN]

	include ./bye_restart_etc.html \ link

	include ./dma.html \ link

	.S .( start tcpset)
	include ./tcp/temp.html \ link
	include ./tcp/pep_h.html \ link
	include ./tcp/icmp_h.html \ link
	include ./tcp/routing_h.html \ link
	include ./tcp/tcp_h.html \ link
	include ./tcp/print_pep.html \ link

	\ must be defined now as used in icmp_demux
	include ./tcp/interface_common.html \ link
	include ./tcp/ip_setup.html \ link
	include ./tcp/io_protocol_common.html \ link

	\ these have to be defined before the interface classes derived because
	\ the :!ip words and :!netmask words have to
	\ add and remove routes.
	include ./tcp/routing.html \ link
	include ./tcp/interface_local.html \ link
	\ defined before proto.html as used there
	include ./tcp/demux.html \ link
	include ./tcp/demux_socket.html \ link
	\ defined before interface_loopback as interface_loopback
	\ has to call the :proto_checksum method
	include ./tcp/proto.html \ link
	include ./tcp/interface_loopback.html \ link

#BCM550h #BCM550j + [IF]
	include ./tcp/ethernet_h.html
	include ./tcp/interface_nice.html
[THEN]

	include ./tcp/udp_demux.html \ link
	include ./tcp/tcp_demux.html \ link
	include ./tcp/icmp_demux.html \ link
	include ./tcp/udp.html \ link
	include ./tcp/icmp_echo.html \ link
	include ./tcp/timestamp.html \ link
	include ./tcp/tcp_client.html \ link
	include ./tcp/tcp_server.html \ link
	include ./ansi.html         \ link
	include ./tcp/rpc.html      \ link
	include ./tcp/nfs.html      \ link

	include ./tcp/telnet_server.html \ link
	include ./tcp/html.html \ link

	include ./kernel_tasks.html \ link
	
	include ./init.html \ link

#BCM550h [IF]
	include ./bcm550h_boot_to_ram.html \ link
[THEN]

#BCM550j [IF]
	include ./bcm550j_boot_to_ram.html \ link
[THEN]

#BVP5502 [IF]
	include ./bvp5502_boot_to_ram.html \ link
[THEN]

#BVP5501 [IF]
	include ./bvp5501_boot_to_ram.html \ link
[THEN]

#BVP5552 [IF]
	include ./bvp5552_boot_to_ram.html \ link
[THEN]

#BVP5551 [IF]
	include ./bvp5551_boot_to_ram.html \ link
[THEN]


	include ./locate.html \ link
	include ./glossary.html \ link

\	include ./print_source.html

	include ./op_function_vectors.html \ link
	include ./environment.html \ link

#BCM550h #BCM550j + [IF] 
	include ./bcm550_vectors.html \ link
[THEN]

#BVP5502 [IF]
	include ./bvp5502_vectors.html \ link
[THEN]

#BVP5501 [IF]
	include ./bvp5501_vectors.html \ link
[THEN]

#BVP5552 [IF]
	include ./bvp5552_vectors.html \ link
[THEN]

#BVP5551 [IF]
	include ./bvp5551_vectors.html \ link
[THEN]

	DECIMAL
	include ./end.4th \ link
	forth
	include ./bcm550_save.html \ link
	
.S .( ABOUT TO FLASH)
	new>flash
.S .( ABOUT TO TEST FOR SAME)
	?same_image
.S  .( finished)