OpenCores
URL https://opencores.org/ocsvn/ssbcc/ssbcc/trunk

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [tb/] [arch/] [arch-nomem.s] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sinclairrf
; Copyright 2012, Sinclair R.F., Inc.
2
;
3
; Test the memory functions for various system architectures -- no memory tests.
4
 
5
.main
6
 
7
  ;
8
  ; test all bits of the data stack
9
  ;
10
 
11
  ; Push 0x01 ... 0x80 onto the data stack far enough to be out of T and N and into the data stack memory.
12
  0x01 :loop_data_stack_bits dup .jumpc(loop_data_stack_bits,<<0)
13
 
14
  ; Drop everything from the data stack
15
  ${10-1} :loop_drop_data_stack_bits nip .jumpc(loop_drop_data_stack_bits,1-) drop
16
 
17
  ;
18
  ; Test all data bits on the return stack.
19
  ;
20
 
21
  0x01 :loop_return_stack_bits dup >r .jumpc(loop_return_stack_bits,<<0) drop
22
 
23
  ; Drop everything from the return stack
24
  ${9-1} :loop_drop_return_stack_bits r> drop .jumpc(loop_drop_return_stack_bits,1-) drop
25
 
26
  ; test function calls mixed with return stack operations
27
  .call(testfn,3) drop
28
 
29
  ; terminate the simulation
30
  .outstrobe(O_DONE_STROBE)
31
 
32
  :infinite .jump(infinite)
33
 
34
.function testfn
35
  >r r@ 1- .callc(testfn,nop) r>
36
  .return(+)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.