|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- ##
- ## University of Bristol – Open Access Software Licence
- ## Copyright (c) 2016, The University of Bristol, a chartered
- ## corporation having Royal Charter number RC000648 and a charity
- ## (number X1121) and its place of administration being at Senate
- ## House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom.
- ## All rights reserved
- ##
- ## Redistribution and use in source and binary forms, with or without
- ## modification, are permitted provided that the following conditions
- ## are met:
- ##
- ## 1. Redistributions of source code must retain the above copyright
- ## notice, this list of conditions and the following disclaimer.
- ##
- ## 2. Redistributions in binary form must reproduce the above
- ## copyright notice, this list of conditions and the following
- ## disclaimer in the documentation and/or other materials provided
- ## with the distribution.
- ##
- ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- ## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- ## FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- ## COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- ## INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- ## (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- ## SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- ## STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- ## OF THE POSSIBILITY OF SUCH DAMAGE.
- ##
- ## Any use of the software for scientific publications or commercial
- ## purposes should be reported to the University of Bristol
- ## (OSI-notifications@bristol.ac.uk and quote reference 2668). This is
- ## for impact and usage monitoring purposes only.
- ##
- ## Enquiries about further applications and development opportunities
- ## are welcome. Please contact elisabeth.oswald@bristol.ac.uk
- ##
-
- .syntax unified
- .text
- .thumb
-
- .func starttrigger
- .global starttrigger
-
- starttrigger:
- push {r0-r7}
- movs r4, #0xE0
- lsls r4, #24
- movs r5, #0x04
- eors r4, r5
- movs r5, #1
- str r5, [r4, #0]
- pop {r0-r7}
- bx lr
-
- .endfunc
-
- .func endtrigger
- .global endtrigger
-
- endtrigger:
- push {r0-r7}
- movs r4, #0xE0
- lsls r4, #24
- movs r5, #0x04
- eors r4, r5
- movs r5, #0
- str r5, [r4, #0]
- pop {r0-r7}
- bx lr
-
- .endfunc
-
- .func readbyte
- .global readbyte
-
- readbyte:
- push {r0-r7}
- movs r4, #0xE1
- lsls r4, #24
- ldr r1, [r4, #0]
- strb r1, [r0, #0]
- pop {r0-r7}
-
- bx lr
-
- .endfunc
-
- .func LoadN
- .global LoadN
-
- LoadN:
- push {r0-r7}
- movs r4, #0xE1
- lsls r4, #24
- movs r5, #0x10
- eors r4, r5
- ldr r1, [r4, #0]
- str r1, [r0, #0]
- pop {r0-r7}
-
- bx lr
-
- .endfunc
-
- .func randbyte
- .global randbyte
-
- randbyte:
- push {r0-r7}
- movs r4, #0xE1
- lsls r4, #24
- movs r5, #0x04
- eors r4, r5
- ldr r1, [r4, #0]
- strb r1, [r0, #0]
- pop {r0-r7}
-
- bx lr
-
- .endfunc
-
- .func getstart
- .global getstart
-
- getstart:
- push {r0-r7}
- movs r4, #0xE1
- lsls r4, #24
- movs r5, #0x08
- eors r4, r5
- ldr r1, [r4, #0]
- str r1, [r0, #0]
- pop {r0-r7}
-
- bx lr
-
- .endfunc
-
-
- .func getruncount
- .global getruncount
-
- getruncount:
- push {r0-r7}
- movs r4, #0xE1
- lsls r4, #24
- movs r5, #0x0C
- eors r4, r5
- ldr r1, [r4, #0]
- str r1, [r0, #0]
- pop {r0-r7}
-
- bx lr
-
- .endfunc
-
-
-
- .func printbyte
- .global printbyte
-
- printbyte:
- push {r0-r7}
- movs r4, #0xE0
- lsls r4, #24
- ldrb r5, [r0]
- str r5, [r4]
- pop {r0-r7}
- bx lr
-
- .endfunc
-
- .func endprogram
- .global endprogram
-
- endprogram:
- push {r0-r7}
- movs r4, #0xF0
- lsls r4, #24
- movs r5, #0
-
- str r5, [r4]
- pop {r0-r7}
- bx lr
-
- .endfunc
-
- .func initialisemaskflow
- .global initialisemaskflow
-
- # Takes address of key as input (r0)
- initialisemaskflow:
- push {r0-r7}
- movs r4, #0xE0
- lsls r4, #24
- movs r5, #0x40
- eors r4, r5
- str r0, [r4]
- pop {r0-r7}
- bx lr
-
- .endfunc
-
- .func resetmaskflow
- .global resetmaskflow
-
- resetmaskflow:
- push {r0-r7}
- movs r4, #0xE0
- lsls r4, #24
- movs r5, #0x42
- eors r4, r5
- movs r5, #0
- str r5, [r4]
- pop {r0-r7}
- bx lr
-
- .endfunc
-
- .func setmaskflowstart
- .global setmaskflowstart
-
- # Takes r0 as start number
-
- setmaskflowstart:
- push {r0-r7}
- movs r4, #0xE0
- lsls r4, #24
- movs r5, #0x44
- eors r4, r5
- str r0, [r4]
- pop {r0-r7}
- bx lr
-
- .endfunc
-
- .func resetdatafile
- .global resetdatafile
-
- resetdatafile:
- push {r0-r7}
- movs r4, #0xE0
- lsls r4, #24
- movs r5, #0x46
- eors r4, r5
- movs r5, #0
- str r5, [r4]
- pop {r0-r7}
- bx lr
-
- .endfunc
|