From: ian Date: Thu, 22 Dec 2005 13:36:00 +0000 (+0000) Subject: working on making it compile X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=b93619fa80f0a79091a836afe8ca3de8601f8d51;p=trains.git working on making it compile --- diff --git a/detpic/mascan.asm b/detpic/mascan.asm index 23e80e2..bfd57b9 100644 --- a/detpic/mascan.asm +++ b/detpic/mascan.asm @@ -115,6 +115,12 @@ read_got_detectors_b2 ;---------- read_got_detectbyte_something +; branched from read_prep_detectbyte +; b -> ?d??ddddd +; W ?C??CCCC +; t adj.detbasel +; FSR1 -> lastd + fixme need to preserve CCC's for use by addmsg_ xor_wfw INDF1 ; lastd = ?d??dddd mov_lw 0x07 ior_wff FSR1L ; FSR1L -> detmsgh @@ -141,9 +147,9 @@ loopback_read_byte ;... ; W message xor_lw 0x00 ^ 0x20 - bra_z cdu_got_pointed + bra_z got_pointed xor_lw 0x20 ^ 0xb0 - bra_z slave_got_aargh + bra_z got_aargh panic morse_MX ;---------- @@ -156,7 +162,8 @@ read_prep_detectbyte ; NOS return address for i2cmu_read_got_byte mov_wf t ; t = adj.detbasel mov_fw b ; W = ?d??dddd - xor_wfw INDF1 ; lastd = ?C??CCCC, Z iff same + xor_wfw INDF1 ; W = ?C??CCCC, Z iff same + ; where C set iff change to that detection segment bra_nz read_got_detectbyte_something xor_wfw INDF1 ; lastd = ?d??dddd ; there's nothing to do @@ -178,7 +185,7 @@ i2c_arrange_something ; GENERATION OF DETECTION MESSAGES FOR HOST - MAD BT_F_IF1 TABLES addmsg_testbit macro bit - bt_f_if1 w, bit + bt_f_if1 w, bit fixme need to test something other than w ! rcall addmsg endm @@ -197,6 +204,10 @@ addmsg_padding macro dummy_bit mov_lw dummy_bit endm +fixme comment this better +addmsg registers on entry +strangeness with offsets etc. + addmsgs_section code 0x2100 + 6*4 addmsgs_dethead addmsg_testbit 6 diff --git a/detpic/mascan.fin b/detpic/mascan.fin index 6696f7f..ddd160a 100644 --- a/detpic/mascan.fin +++ b/detpic/mascan.fin @@ -1 +1,2 @@ extern i2cm_intrl + extern loopback_read_byte diff --git a/detpic/morse.messages b/detpic/morse.messages index 85c1c53..584e45a 100644 --- a/detpic/morse.messages +++ b/detpic/morse.messages @@ -56,6 +56,8 @@ UC UI UG UX +UCI +UCP # Messages for i2clib, S* SM i2clib:st,:sspstat,:sspcon1,:sspcon2 ; m.,i., ctrlr bad state diff --git a/detpic/panic.fin b/detpic/panic.fin index dfa3e9f..e5b139a 100644 --- a/detpic/panic.fin +++ b/detpic/panic.fin @@ -6,3 +6,4 @@ extern i2csu_read_begin_panicd extern i2csu_read_another_panicd extern command_crashed + extern got_aargh diff --git a/detpic/points.asm b/detpic/points.asm index f2c55e0..cd9aedb 100644 --- a/detpic/points.asm +++ b/detpic/points.asm @@ -230,7 +230,10 @@ point_timer_init_endif_masterslave return ;====================================================================== -;cdu_init + +cdu_init panic morse_UCI ; For master pic only. Sorts out the CDU's pin. +cdu_got_pointed panic morse_UCP + include final.inc diff --git a/detpic/points.fin b/detpic/points.fin index ee26d75..cd4679c 100644 --- a/detpic/points.fin +++ b/detpic/points.fin @@ -2,3 +2,5 @@ extern point_local_do extern points_local_init extern points_local_intrl + extern cdu_init + extern got_pointed diff --git a/detpic/serout.asm b/detpic/serout.asm index cd5e845..325c6bb 100644 --- a/detpic/serout.asm +++ b/detpic/serout.asm @@ -1,5 +1,8 @@ ;====================================================================== +; SERIAL PORT - TRANSMISSION TO HOST + include common.inc + code ;---------------------------------------- serial_addbyte ; W byte for transmission to host trashed @@ -18,7 +21,7 @@ serial_addbyte_another ; STATUS any trashed ; all others any not interfered with ; - mov_wf POSTIN0C + mov_wf POSTINC0 bc_f FSR0L, 7 mov_fw FSR0L mov_wf outmsg_end @@ -28,3 +31,6 @@ serial_addbyte_another ;----- serial_addbyte_toomany panic morse_HB + +;====================================================================== + include final.inc