chiark / gitweb /
reserve /^ [^ ;]/ for statements inserted for debugging purposes
authorian <ian>
Thu, 29 Dec 2005 00:41:03 +0000 (00:41 +0000)
committerian <ian>
Thu, 29 Dec 2005 00:41:03 +0000 (00:41 +0000)
32 files changed:
cebpic/manypics.make
detpic/common.inc
detpic/detect.asm
detpic/detect.inc
detpic/energy.asm
detpic/energy.fin
detpic/final.inc
detpic/i2clib.asm
detpic/i2clib.inc
detpic/make-panicworthy
detpic/mascan.asm
detpic/mascan.fin
detpic/misc.asm
detpic/misc.fin
detpic/nmra-stream.asm
detpic/nmra-stream.fin
detpic/panic.asm
detpic/panic.fin
detpic/points.asm
detpic/points.fin
detpic/program.asm
detpic/program.fin
detpic/reverse.asm
detpic/reverse.fin
detpic/serout.asm
detpic/serout.fin
detpic/tick.asm
detpic/tick.fin
detpic/variables.asm
detpic/vectors.fin
iwjpictest/syncwrite.asm
layout/data2safety

index fe43038e63e15188418cc7a0a1deb97ad03c9b9c..c08e4851a02c4def26273f68cf217daeb5152e49 100644 (file)
@@ -84,7 +84,7 @@ morse+auto.inc:       $(CEBPIC)morse-generator morse.messages
                        BEGIN { print "; autogenerated - do not edit\n"; } \
                        next unless m/^(\w+)\s/;                        \
                        next if m/^\w+\s+(?:equ|udata|udata_acs)\s+/;   \
-                       print " extern $$1\n" or die $$!;               \
+                       print "  extern $$1\n" or die $$!;              \
                ' <$< $o
 
 %+morse.asm:   $(CEBPIC)morse-generator morse.messages %+program.map
index b512906a0e13a8c3950080fe83961a3c340805f3..4efa996c79ccc9f358e6411e34dfe6c589b02be7 100644 (file)
@@ -203,12 +203,12 @@ load_tblptr macro value
        mov_lw  value >> 8
        mov_wf  TBLPTRH
 
- if value > 0xffff
 if value > 0xffff
        mov_lw  value >> 16
        mov_wf  TBLPTRU
- else
 else
        clr_f   TBLPTRU
- endif
 endif
        endm
 
 load_perpic_tblptr macro flash_map_base, perpic_entry_size
@@ -239,7 +239,7 @@ load_perpic_tblptr macro flash_map_base, perpic_entry_size
 ; and <port> is 0 1 2 3 4 5 6 7.  Generally p<picno>_<subsystem>_<pin>
 ; are equ'd for this.
 
- radix hex
 radix hex
 p0_cdu_enable          equ     5b
 p0_rs232_fcin          equ     4b
 p0_booster_shutdown    equ     2b
@@ -253,7 +253,7 @@ pall_pt0reverse             equ     7b
 p0_spare0              equ     0a
 p0_booster_dirn                equ     0c
 p0_booster_pwm         equ     1c
- radix dec
 radix dec
 
 ;                      
 ;  LAT*                        may be subject to read-modify-write, see below
index ca6aca8d5d2ec9a483edf172b92724dc151a342e..f5553e6414ddb29ecd6bb9c144927d8a91104b2d 100644 (file)
@@ -7,7 +7,7 @@
 
 ; FSR2 is used as readout pointer
 
- include common.inc
 include common.inc
 
 ; I2C protocol is as follows:
 ;
@@ -59,7 +59,7 @@
 
 max_messages equ 4
 
- udata_acs
 udata_acs
 
 unattendedl    res     1       ; counts up; each det loop it is
 unattendedh    res     1       ; incremented by no. of bytes of pc in
@@ -162,7 +162,7 @@ slave_add_short_message
 
 ;----------
 backgroundloop_again macro backgroundloop_whatever
- local branchposition
 local branchposition
        inc_f_ifnz unattendedl
        bra     backgroundloop_whatever
        mov_lw  branchposition - backgroundloop_whatever
@@ -426,4 +426,4 @@ read_detection_head_master_badmore
        panic   morse_DM
 
 ;======================================================================
- include final.inc
 include final.inc
index a8822232912ecb6f9635c5796ef97ae8be2b8764..9d18003cc09f98743909aae18c9a581d883fd55e 100644 (file)
@@ -1,7 +1,7 @@
- extern detect_local_init
- extern detect_slave_init
- extern slave_add_short_message
- extern read_detection_head_master
- extern backgroundloop_master
- extern backgroundloop_reversers
- extern backgroundloop_detectors
 extern detect_local_init
 extern detect_slave_init
 extern slave_add_short_message
 extern read_detection_head_master
 extern backgroundloop_master
 extern backgroundloop_reversers
 extern backgroundloop_detectors
index 59aa76bbc9455ebebd0f5d71902b7f928cfdea14..b1429c4034ad9eb0a7e93c16036b92f8456a0444 100644 (file)
@@ -1,7 +1,7 @@
 ;======================================================================
 ; TRACK POWER AND SHORT CIRCUIT
 
- include common.inc
 include common.inc
 
 settling_timeout       equ      10000 ; us
 
@@ -10,12 +10,12 @@ stopflash_timeout   equ      25000 ; us
 retry_timeout          equ      50000 ; us
 persist_timeout                equ      90000 ; us
 
- udata_acs
 udata_acs
 settling       res     1 ; all counters are 0 if stopped
 stop_wait      res     1 ;  or otherwise count down
 retry_wait     res     1
 
- code
 code
 
 ;======================================================================
 ;
@@ -213,4 +213,4 @@ power_panichook
        return
 
 ;======================================================================
- include final.inc
 include final.inc
index 0855246bc55bd781e1881cbbaf9560fbaf84c5c3..8a7d95af638ea21fcc906ac7b6fe700636f3b258 100644 (file)
@@ -1,10 +1,10 @@
- extern command_power
- extern power_polarising_init
- extern power_polarising_tick
- extern power_polarising_begin
- extern power_polarising_settling
- extern power_fault_init
- extern power_fault_intrl
- extern power_fault_tick
- extern power_fault_tickdiv
- extern power_panichook
 extern command_power
 extern power_polarising_init
 extern power_polarising_tick
 extern power_polarising_begin
 extern power_polarising_settling
 extern power_fault_init
 extern power_fault_intrl
 extern power_fault_tick
 extern power_fault_tickdiv
 extern power_panichook
index 24a2dabf86e6072c01dac04108c22abd472ce8e7..e28c80b95453d95b1bb5c1f2c52acd73b03439cf 100644 (file)
@@ -1,18 +1,18 @@
- include ../iwjpictest/syncwrite.inc
- include detect.inc
- include energy.fin
- include i2clib+panic.inc
- include mascan.fin
- include misc.fin
- include nmra-stream.fin
- include panic.fin
- include points.fin
- include program.fin
- include reverse.fin
- include routines-led.fin
- include serout.fin
- include tick.fin
- include variables+vars.fin
- include vectors.fin
 include ../iwjpictest/syncwrite.inc
 include detect.inc
 include energy.fin
 include i2clib+panic.inc
 include mascan.fin
 include misc.fin
 include nmra-stream.fin
 include panic.fin
 include points.fin
 include program.fin
 include reverse.fin
 include routines-led.fin
 include serout.fin
 include tick.fin
 include variables+vars.fin
 include vectors.fin
 
        end
index 2fb1cb06400eb2b763a4b022d32676aa32e57c0a..7b059051036ef11b9c7c7f06bbaf08f24bcdcd42 100644 (file)
@@ -3,14 +3,14 @@
 ;
 ; See i2clib.asm for documentation of the interface to this file.
 
- include /usr/share/gputils/header/p18f458.inc
- radix dec
- include ../iwjpictest/insn-aliases.inc
 include /usr/share/gputils/header/p18f458.inc
 radix dec
 include ../iwjpictest/insn-aliases.inc
 
- include ../iwjpictest/clockvaries.inc
- include panic.inc
- include morse+auto.inc
- include i2clib.incm
 include ../iwjpictest/clockvaries.inc
 include panic.inc
 include morse+auto.inc
 include i2clib.incm
 
 ;======================================================================
 ; NOTATION
@@ -493,7 +493,7 @@ s_event_bad
 
 ;======================================================================
 
- include panic.fin
- include i2clib.inc
 include panic.fin
 include i2clib.inc
 
- end
 end
index 99f80066fb60c259b7d80226e02814d44f4aed5d..296b11573f3ebd6fa983620a8dbbfa6895f7f555 100644 (file)
@@ -63,7 +63,7 @@
 ; COMMON ADMINISTRATIVE ROUTINES
 
 ;--------------------
- extern i2cm_init
 extern i2cm_init
 ;
 ; Initialises the i2c system for use by a master PIC.  Must be called
 ; exactly once, which must be before any other i2c?_... function.
@@ -74,7 +74,7 @@
 ;   State                      Not-in-use              Idle (as master)
 
 ;--------------------
- extern i2cs_init
 extern i2cs_init
 ;
 ; Initialises the i2c system for use by a slave PIC.  Must be called
 ; exactly once, which must be before any other i2c?_... function.
@@ -87,9 +87,9 @@
 ;   W                          slave number            any
 
 ;--------------------
- extern i2cm_interrupt
- extern i2cm_interrupt_definite
- extern i2cs_interrupt
 extern i2cm_interrupt
 extern i2cm_interrupt_definite
 extern i2cs_interrupt
 ;
 ; Must be called by the main program's interrupt handler;
 ; high-priority for the slave or low-priority for the master.
 ;                           `-------------------------------------'
 
 ;--------------------
- extern i2cmu_done
 extern i2cmu_done
 
 ; Called to notify that the previous conversation with the slave has
 ; been finished as requested.  The i2c system is now available and
 ; MASTER - WRITES (ie, transmission of data to the slave)
 
 ;--------------------
- extern i2cm_write_start
 extern i2cm_write_start
 ;
 ; Requests that a slave be contacted for writing.  When communication
 ; has been established, i2cmu_write_next_byte will be called.
 ;   State                   Idle/Reading-Wait  Writing-Setup
 ;   W                          slave number    any
 
- extern i2cmu_write_next_byte
 extern i2cmu_write_next_byte
 ;
 ; Called to notify the main program that we are now ready to transmit
 ; a byte to the slave that we're currently talking to.  This may be
 ; MASTER - READS (ie, reception of data from the slave)
 
 ;--------------------
- extern i2cm_read_start
 extern i2cm_read_start
 ;
 ; Requests that a slave be contacted for reading.  When communication
 ; has been established and the first byte received,
 ;   State                   Idle/Reading-Wait  Reading-Busy
 ;   W                          slave number    any
 
- extern i2cmu_read_got_byte
 extern i2cmu_read_got_byte
 ;
 ; Called to notify the main program that a byte has been recieved from
 ; the slave PIC.  The byte value is supplied.  Communication with the
 ;   State      Reading         Reading-Wait
 ;   W                          data from slave
 
- extern i2cm_read_another
 extern i2cm_read_another
 ;
 ; Requests that the communication with the slave continue and another
 ; byte be read.  When this is complete, i2cmu_read_got_byte will be
 ;                              At call         On return
 ;   State                      Reading-Wait    Reading-Busy
 
- extern i2cm_read_done
 extern i2cm_read_done
 ;
 ; Requests that reading from the slave be terminated.  When the
 ; conversation is finished and the bus and i2c controller are free
 ; SLAVE - WRITES (ie, reception of data from the master)
 
 ;--------------------
- extern i2csu_write_begin
 extern i2csu_write_begin
 ;
 ; Called to notify the main program that the master PIC has selected this
 ; slave to talk to, for writing.  There is no data at this stage; when
 ;   State      Idle            Receiving               Receiving
 
 ;--------------------
- extern i2csu_write_data
 extern i2csu_write_data
 ;
 ; Called to notify the main program that the master PIC has
 ; transmitted a byte of data.  Provides the byte we received.
 ; SLAVE - READS (ie, transmission of data to the master)
 
 ;--------------------
- extern i2csu_read_begin
 extern i2csu_read_begin
 ;
 ; Called to notify the main program that the master PIC has selected
 ; this slave to talk to, for reading.  The main program should invoke
 ;   State      Idle            Transmit-Wait
 
 ;--------------------
- extern i2cs_read_data
 extern i2cs_read_data
 ; Transmits the byte of data to the master
 ;
 ;              Beforehand      At call                 On return
 ; in i2clib.incm, which does the same thing.
 
 ;--------------------
- extern i2csu_read_another
 extern i2csu_read_another
 ;
 ; Called to notify the main program that the master PIC has continued
 ; by asking for another byte of data.  The main program should once
index 9f127cf499e4c3a691fe7b63dce0b888e52d302e..94db34fefd8a70a1a7a6f4a8f60ee13afad0cfe4 100755 (executable)
@@ -36,7 +36,7 @@ if (m/^(\w*)\s+code\b/) {
 } elsif (m/^(\w*)\s+(?:equ)\b/) {
 } elsif (m/^\s+extern\s+(\w+)\b/) {
     mangle($1);
-    print " extern $pfx$1;##\n" or die $!
+    print "  extern $pfx$1;##\n" or die $!
        unless $manglout;
 } elsif (!$inmacro && defined $codesection) {
     if (!s/^\;/;\#\#/) {
@@ -49,7 +49,7 @@ if (m/^(\w*)\s+code\b/) {
     $l= '';
 }
 if (m/^\s+include\s+(\S+)\s+$/ && exists $mapinclude{$1}) {
-    $l= " include $mapinclude{$1}\n";
+    $l= "  include $mapinclude{$1}\n";
 }    
 print $l or die $!
     unless $manglout;
index 6ebc4851827746bb350594a653f8742d08f1d892..a9f63d623be32d30c5aa9f70f12eab55029afa65 100644 (file)
@@ -1,10 +1,10 @@
 ;======================================================================
 ; MASTER - SCANNING ETC.
 
- include common.inc
 include common.inc
 
 ;----------------------------------------------------------------------
- udata_acs
 udata_acs
 
 ; for reading and detection:
 b      res     1       ; byte just read
@@ -31,7 +31,7 @@ i2c_getwritebyte_yes
        bc_f    STATUS, Z       ; yes, we want to write this byte
        return          ; from i2cmu_write_next_byte
        
- code
 code
 ;----------------------------------------
 i2cmu_write_next_byte
        ; add calls to getwritebyte_<foo> here:
@@ -331,10 +331,10 @@ mascan_init_ifabsent
        bra     mascan_init_loop
        ; we've read the whole flash table
 
- if slavetable == 0x400
 if slavetable == 0x400
        bt_f_if1 FSR0H, 0
        bra     mascan_bad_toomany
- endif
 endif
 
        clr_f   POSTINC0                ; ste_slave
        mov_lw  (1<<stf_detect)|(1<<stf_sentinel)
@@ -465,4 +465,4 @@ addmsg_one
        goto    serial_addbyte_another
 
 ;======================================================================
- include final.inc
 include final.inc
index e94964066f7f1f8e2f7751a4da992c39c1e87379..d81342d4289d031a32eb59066a2412811b4eaf2f 100644 (file)
@@ -1,6 +1,6 @@
- extern i2cm_intrl
- extern mascan_init
- extern loopback_read_byte
- extern i2c_needwrite
- extern i2c_consider_restartread
- extern i2c_getwritebyte_yes
 extern i2cm_intrl
 extern mascan_init
 extern loopback_read_byte
 extern i2c_needwrite
 extern i2c_consider_restartread
 extern i2c_getwritebyte_yes
index 255f7db11771e310caed8796b6063ca8a313a454..fe6695a8d661a510d7bf3d3372f93b5ce9fa98f5 100644 (file)
@@ -1,7 +1,7 @@
 ;======================================================================
 
- include common.inc
- code
 include common.inc
 code
 
 ;======================================================================
 ; GENERALLY USEFUL ROUTINES
@@ -49,4 +49,4 @@ init_bitnum2bit_loop
        bra_nn  init_bitnum2bit_loop
        return
 
- include final.inc
 include final.inc
index 0679b030ae2e90000adc89ba808d8b0f31697d97..b0ca143d92e4d29a6c31822025e64432a4c525f0 100644 (file)
@@ -1,3 +1,3 @@
- extern read_pic_no
- extern idlocs_init
- extern bitnum2bit_init
 extern read_pic_no
 extern idlocs_init
 extern bitnum2bit_init
index 9688c35209c88b8f846a91866527d886ebcc5178..73ef457b92e63c69e799a5e1aa9357d3f9ea63eb 100644 (file)
@@ -17,9 +17,9 @@
 
 clock equ mclock ; this part runs really only on master
 
- include common.inc
 include common.inc
 
- udata_acs
 udata_acs
 
 nmractrl       res     1       ; state relevant to NMRA control
 transmitbit    equ     7       ; bit 7: 0/1 bit currently being transmitted
@@ -66,7 +66,7 @@ buffer1 res 16
 buffer2 res 16
 buffer3 res 16
 
- code
 code
 
 ;****************************************************************************
 
@@ -461,4 +461,4 @@ panic_ferr  panic   morse_HF
 
 ;****************************************************************************
 
- include final.inc
 include final.inc
index 968faedf622a0ba7d0fb1aabe761309a8ffd441e..eeb898634207564333fc0c440be2025913433337 100644 (file)
@@ -1,5 +1,5 @@
- extern nmra_init
- extern serial_init
- extern serial_interrupts_init
- extern nmra_serialrx_intrl
- extern nmra_restartmessage
 extern nmra_init
 extern serial_init
 extern serial_interrupts_init
 extern nmra_serialrx_intrl
 extern nmra_restartmessage
index 40657c5bf90aac727b7eee729a1443940f84c653..2e70a5a3684be37e79117455144ac04befc37564 100644 (file)
@@ -10,7 +10,7 @@
 ;---------------------------------------------------------------------------
 ; reserved access bank locations
 
- udata_acs
 udata_acs
 
 psave_intcon   res     1
 psave_bsr      res     1
@@ -362,8 +362,8 @@ panicst_oerrferr
 ;----------
 panicd_serialrx_err
        bs_f    panicst, panicst_ferroerr
-       bc_f    RCSTA, RCEN     ; disable       } to clear FERR/OERR
-       mov_fw  RCREG           ; read RCREG    } (see PIC18FXX8 DS p182)
+       bc_f    RCSTA, RCEN     ; disable       } to clear FERR/OERR
+       mov_fw  RCREG           ; read RCREG    } (see PIC18FXX8 DS p182)
        bs_f    RCSTA, RCEN     ; reenable      }
 panicd_serialrx_err_loop
        bt_f_if0 PIR1, RCIF ; wait for a byte 0x01 to ack the overrun/error
index e5b139a0b37d0569a315ac477e6e493626e0de1f..1f807e1babe40845fac260c3dfed916364a080e3 100644 (file)
@@ -1,9 +1,9 @@
- extern panic_routine
- extern panic_kill_hook
- extern panic_crashread_setpointer
- extern panic_crashread_commanded
- extern i2csu_write_panicd
- extern i2csu_read_begin_panicd
- extern i2csu_read_another_panicd
- extern command_crashed
- extern got_aargh
 extern panic_routine
 extern panic_kill_hook
 extern panic_crashread_setpointer
 extern panic_crashread_commanded
 extern i2csu_write_panicd
 extern i2csu_read_begin_panicd
 extern i2csu_read_another_panicd
 extern command_crashed
 extern got_aargh
index af3979af8762b530f1c434f4d32757530e9ed8e1..196dadd0f80b1db577c8cfb8a547aec38f80e5b5 100644 (file)
@@ -1,7 +1,7 @@
 ;======================================================================
 ; POINTS
 
- include common.inc
 include common.inc
 
 ;======================================================================
 ; VARIABLES, HARDWARE, ETC
@@ -26,15 +26,15 @@ cdu_timeout equ     200 ; ms
 
 ptix2latbit equ 0x300 ; has to be a multiple of 0x100
 ptix2latbit_section udata ptix2latbit
res maxpoints * 2     ; LAT* and bit
 res maxpoints * 2    ; LAT* and bit
                        ; for unused point, 0x00 and 0x00
 
- udata_acs
 udata_acs
 pointslave             res     1
 pointmsg               res     1
 cducharging            res     1
 
- udata 0x340
 udata 0x340
 slave2ptinfo           res     maxpics
 slave2ptinfo_anypoints equ     0
 
@@ -400,4 +400,4 @@ pointed_butnot_firing panic morse_PA
 pointed_already_charging panic morse_PQ
 
 ;======================================================================
- include final.inc
 include final.inc
index 350ea5062fb8e27837b3bd861a4066f0709d2241..5200239ba5cffe8bac2158e91f6ceb801d089ae4 100644 (file)
@@ -1,13 +1,13 @@
- extern command_point
- extern points_master_init
- extern point_local_do
- extern points_local_init
- extern points_local_intrl
- extern points_needwrite
- extern points_getwritebyte
- extern got_pointed
- extern cdu_init
- extern cdu_tickdiv
- extern cdu_on
- extern cdu_off
- extern cdu_panichook
 extern command_point
 extern points_master_init
 extern point_local_do
 extern points_local_init
 extern points_local_intrl
 extern points_needwrite
 extern points_getwritebyte
 extern got_pointed
 extern cdu_init
 extern cdu_tickdiv
 extern cdu_on
 extern cdu_off
 extern cdu_panichook
index e3c5c6d20b3f208716098ff4f546e65acfbcda3c..58475065f4dd0c31faf91fd06778b8b37b957562 100644 (file)
@@ -1,8 +1,8 @@
 ;======================================================================
 ; MAIN PROGRAM AND GLUE
 
- include common.inc
- code
 include common.inc
 code
 
 ;======================================================================
 ; COMMON TO MASTER AND SLAVE
@@ -223,4 +223,4 @@ message_for_master
        goto    loopback_read_byte
 
 ;======================================================================
- include final.inc
 include final.inc
index d056fd5ed35f6dc9bfaabd14978e576045383585..039d81f736fed3d662f4b3506655353140dba945 100644 (file)
@@ -1,3 +1,3 @@
- extern serialrx_generalmsg
- extern message_for_master
- extern master_interrupt_high_notnmra
 extern serialrx_generalmsg
 extern message_for_master
 extern master_interrupt_high_notnmra
index 7d4e76d050ec23d69b1fc0a0320832924e99df5e..227742a225e203cfade5a0ffed7b40966dcfd4ac 100644 (file)
@@ -1,12 +1,12 @@
 ;======================================================================
 ; REVERSERS
 
- include common.inc
 include common.inc
 
 ;----------------------------------------
 ; LOCAL REVERSERS - Variables
 
- udata_acs
 udata_acs
 maska                          res     1
 maske                          res     1
 
@@ -15,7 +15,7 @@ maske                         res     1
 
 polarity_cmds equ 0x5f
 polarity_cmds_section udata polarity_cmds
- res maxpics
 res maxpics
        ; Each byte is:
        ;       11RRRRRR        reverse command for slave, waiting to write
        ;       00000001        this is not a reversers board
@@ -67,7 +67,7 @@ polarity_local_do
                                ;       v<n> is new reverse bit
        return
 
- code
 code
 ;----------
 polarity_local_init
        load_perpic_tblptr picno2revmasks, 2
@@ -268,4 +268,4 @@ polarity_getwritebyte
        return
 
 ;======================================================================
- include final.inc
 include final.inc
index fc313d49679f6ec6ec39737697b4c5ceee7b9950..2b9bb45853de0d8192892b2c61c61543d12720e7 100644 (file)
@@ -1,6 +1,6 @@
- extern command_polarity
- extern polarity_local_do
- extern polarity_local_init
- extern polarity_master_init
- extern polarity_needwrite
- extern polarity_getwritebyte
 extern command_polarity
 extern polarity_local_do
 extern polarity_local_init
 extern polarity_master_init
 extern polarity_needwrite
 extern polarity_getwritebyte
index b7925bc1eb401866dcd4e46bfea7d82bf48e384b..9875e65d25b9b61cbb7bb767411b5bd04522d2cb 100644 (file)
@@ -1,8 +1,8 @@
 ;======================================================================
 ; SERIAL PORT - TRANSMISSION TO HOST
 
- include common.inc
- code
 include common.inc
 code
 ;----------------------------------------
 serial_addbyte
 ;  W                   byte to xmit to host    trashed
@@ -113,4 +113,4 @@ serialtxbuf_init
        goto    serial_addbyte
 
 ;======================================================================
- include final.inc
 include final.inc
index 894bd57e6d522c756d25ec908d5313aa354035c9..b379166515657b72c70a7e396321b4804029accf 100644 (file)
@@ -1,6 +1,6 @@
- extern serial_addbyte
- extern serial_addbyte_another
- extern serialtx_intrl
- extern serialtxfc_init
- extern serialtxbuf_init
- extern portb_read
 extern serial_addbyte
 extern serial_addbyte_another
 extern serialtx_intrl
 extern serialtxfc_init
 extern serialtxbuf_init
 extern portb_read
index a039eb6d21c27a06e83297ffa96aa78673e541b8..00ac3802a450c973f0c6b6edd135a1ded2f9c397 100644 (file)
@@ -4,12 +4,12 @@
 ; after tick_init, and after interrupts enabled,
 ; we call <foo>_tick every 1ms and <foo>_tickdiv every <tickdiv>ms.
 
- include common.inc
 include common.inc
 
- udata_acs
 udata_acs
 tickdiv_count  res     1
 
- code
 code
 ;----------------------------------------
 tick_init
 ;  Timer 2             any                     used for tick
@@ -55,4 +55,4 @@ tickdiv_do
        intrl_handled_nostack
 
 ;----------------------------------------------------------------------
- include final.inc
 include final.inc
index 18adad3ab17b803e5e73caf69ca473312206cf43..a0013e4eb5d9586adc1912034e5c03381022aea0 100644 (file)
@@ -1,2 +1,2 @@
- extern tick_init
- extern tick_intrl
 extern tick_init
 extern tick_intrl
index 65df513c81476298f0f52d3922321e1020b0d570..afcba6e8e282709e615ee66920c223628d72d2a9 100644 (file)
@@ -1,8 +1,8 @@
 ;======================================================================
 
- include pindata.inc
 include pindata.inc
 
- udata_acs
 udata_acs
 picno          res     1       ; from first idlocs byte
 
 idloc1         res     1       ; from 2nd idlocs byte; bit 7 is master:
@@ -63,7 +63,7 @@ slavetable_section udata slavetable
 ; each board actually present has an entry in this table
 ste_szln2      equ     3
 ste_size       equ     (1<<ste_szln2)
- res maxpics * ste_size
 res maxpics * ste_size
 
 ; each entry is a number of bytes, at these offsets:
 ste_slave      equ 0 ; Gk slave number
@@ -82,6 +82,6 @@ ste_detmsgh   equ 7 ; dk 1 001 1 000 being 1 001 Y SSS
 stf_detect     equ 7 ; Gk  this is a detectors board
 stf_sentinel   equ 6 ; Gk  sentinel slot at end of table
 
- include final.inc
 include final.inc
 
 ;======================================================================
index 6994bff87f1f6f493ca505dc375295c07e4ea22b..e7345c873f215881384d38f75cc42897fa196157 100644 (file)
@@ -1,4 +1,4 @@
- extern vector_reset
- extern master_interrupt_low
- extern master_interrupt_high
- extern slave_interrupt_low
 extern vector_reset
 extern master_interrupt_low
 extern master_interrupt_high
 extern slave_interrupt_low
index 582673cf6e6cd2f8a07d3c4a40bfdb90adc3a676..1e28afe92e7dd7beec4ef22a101b42bf14688bc7 100644 (file)
@@ -4,7 +4,7 @@
        radix           dec
        include         ../iwjpictest/insn-aliases.inc
 
- code
 code
 ;----------------------------------------
 serial_write_char
 ; W            character       undefined
@@ -15,5 +15,5 @@ serial_write_char_loop
        return
 
 ;======================================================================
- include ../iwjpictest/syncwrite.inc
- end
 include ../iwjpictest/syncwrite.inc
 end
index 26b6021ab216ba58f9b223bc4a0839de3a9b5cea..ce477e9202868114fb2ca2fbb04402572598a5ad 100755 (executable)
@@ -474,7 +474,7 @@ sub writeout () {
 sub o_section ($$) {
     my ($sec,$docstring) = @_;
     o("\n;----------\n".
-      " org $sec\n");
+      "  org $sec\n");
     o($docstring);
 }
 sub o_section_end_fill ($$$) {
@@ -485,14 +485,14 @@ sub o_section_end_fill ($$$) {
     } else {
        o("\n");
     }
-    o(sprintf " fill %s, %d*(maxpics-%d)\n\n",
+    o(sprintf "  fill %s, %d*(maxpics-%d)\n\n",
       $fillvalue, $entrysize, $lastnumdone);
 }
 
 sub o_db ($;$) {
     my ($ix,$every) = @_;
     $every=16 unless defined $every;
-    o(($every ? $ix % $every : $ix) ? ',' : "\n db ");
+    o(($every ? $ix % $every : $ix) ? ',' : "\n  db ");
 }
 
 sub writeasm_sense {
@@ -512,9 +512,9 @@ END
       "Detectors equ 0x80\n".
       "Reversers equ 0x00\n\n");
     for ($num=0; $num<@boardtype; $num++) {
-       if (!defined $boardtype[$num]) { o(" dw  0\t\t\t\t; $num\n"); next; }
+       if (!defined $boardtype[$num]) { o("  dw  0\t\t\t\t; $num\n"); next; }
        $base= $sensesbase[$num];
-       o(sprintf " db  SenseExists | 0x%02x, %12s | 0x%02x\t; %d\n",
+       o(sprintf "  db  SenseExists | 0x%02x, %12s | 0x%02x\t; %d\n",
          $base >> 7, ucfirst($boardtype[$num]), $base & 0x7f, $num);
     }
     o_section_end_fill($num, 0, 2);
@@ -530,7 +530,7 @@ sub writeasm_pt {
 ; or boards with no points are all-bits-0.
 END
     for ($num=0; $num<@boardtype; $num++) {
-       if (!defined $boardtype[$num]) { o(" dw  0\t\t\t\t; $num"); next; }
+       if (!defined $boardtype[$num]) { o("  dw  0\t\t\t\t; $num"); next; }
        die if $maxptixln2 < 4; # must be whole no. of 16-bit words
        $elemsize= 1 << ($maxptixln2-3);
        for ($byte=0; $byte < $elemsize; $byte++) {
@@ -557,7 +557,7 @@ END
 ;   Index:  00Dppppp    where D is 1 iff detectors board and p is pt ix
 ;   Value:  0ppp0bbb    where p is port num and b is bit num; or 0xff
 END
-    o(" radix hex\n");
+    o("  radix hex\n");
     for ($typeix=0; $typeix<2; $typeix++) {
        $type= qw(reversers detectors)[$typeix];
        die $type unless $pin_info{$type};
@@ -574,7 +574,7 @@ END
        }
        o("\n");
     }
-    o(" radix dec\n\n");
+    o("  radix dec\n\n");
 }
 
 sub writeasm_reverse {
@@ -594,7 +594,7 @@ END
            $pu->[1] =~ m/^([04])\,\d,(0x\w{2})$/ or die;
            push @{ $portae[!!$1] }, $2;
        }
-       o(' db ');
+       o('  db ');
        o(join(', ', map { @$_ ? join('|',@$_) : '0' } @portae));
        o(sprintf " ; %d\n",$num);
     }
@@ -606,14 +606,14 @@ sub writeasm () {
     close STDOUT or die $!;
     open STDOUT, ">$basename+pindata.asm" or die $!;
     o("; autogenerated - do not edit\n");
-    o("        include pindata.inc\n".
-      "        radix dec\n".
+    o("  include pindata.inc\n".
+      "  radix dec\n".
       "ff equ 0xff\n");
     $each= 10;
     for $k (@objkinds) {
        &{"writeasm_$k"}();
     }
-    o("\n        end\n");
+    o("\n  end\n");
 }
 mainread();
 writeout();