Metropoli BBS
VIEWER: hb_color.lst MODE: TEXT (ASCII)
i860 ASSEMBLER, Beta Version 2.1, August 18th, 1989
Mon Mar 11 15:25:34 1991        Page 1



                              1 screen_base	= 0x0B8000	// Display Adapter RAM Base Address
                              2 screen_offs	= 160 - 8	// Screen Offset for upper right hand corner
                              3 
                              4 delay_count	= 2000000	// Delay before moving *
                              5 
                              6 iobase=	  0xC2000000		// Base address for i860 I/O Space
                              7 
                              8 FLUSH_P=        0xFFFE0000-32
                              9 
                             10 	.atmp r31
                             11 	.text
                             12 
                             13 ld$start::
edefc200e40f0000 00000000    14 	mov		iobase,		r15
        94100001 00000008    15 	mov		0x01,		r16
        0de08080 0000000c    16 	st.b		r16,		0x80(r15)	// Store 1 to port 80
                             17 
                             18 	// initialize control reg
                             19 	// leave all ints disable
                             20 
        38200000 00000010    21 	st.c    	r0,		psr
        38800000 00000014    22 	st.c    	r0,		fsr
        30000000 00000018    23 	ld.c    	fir,		r0
                             24 
        94100002 0000001c    25 	mov		0x02,		r16
        0de08080 00000020    26 	st.b		r16,		0x80(r15)	// Store 2 to port 80
                             27 
                             28 	// clear pipeline
                             29 
        48000430 00000024    30 	pfadd.ss        f0,	f0,	f0
        48000430 00000028    31 	pfadd.ss        f0,	f0,	f0
        48000430 0000002c    32 	pfadd.ss        f0,	f0,	f0
        48000430 00000030    33 	pfadd.ss        f0,	f0,	f0
        48000430 00000034    34 	pfadd.ss        f0,	f0,	f0
        48000430 00000038    35 	pfadd.ss        f0,	f0,	f0
                             36 
        94100003 0000003c    37 	mov		0x03,		r16
        0de08080 00000040    38 	st.b		r16,		0x80(r15)	// Store 3 to port 80
                             39 
        6c000021 00000044    40 	call		flush_cache		// make sure we get a miss
        a0000000 00000048    41 	nop
                             42 
        94100004 0000004c    43 	mov		0x04,		r16
        0de08080 00000050    44 	st.b		r16,		0x80(r15)	// Store 4 to port 80
                             45 
        a0020000 00000054    46 	mov		r0,		r2
ee52000be4128000 00000058    47 	mov		screen_base,	r18
                             48 
        94100005 00000060    49 	mov		0x05,		r16
        0de08080 00000064    50 	st.b		r16,		0x80(r15)	// Store 5 to port 80
                             51 
                             52 loop:
        6c00000f 00000068    53 	call		delay
        a0000000 0000006c    54 	nop
                             55 
i860 ASSEMBLER, Beta Version 2.1, August 18th, 1989
Mon Mar 11 15:25:34 1991        Page 2



        9410072a 00000070    56 	mov		0x072A,		r16
        0de08080 00000074    57 	st.b		r16,		0x80(r15)	// Store 2A to port 80
        1e408098 00000078    58 	st.s		r16,		screen_offs(r18)
        94100720 0000007c    59 	mov		0x0720,		r16
        1e40809a 00000080    60 	st.s		r16,		screen_offs+2(r18)
                             61 
        6c000008 00000084    62 	call		delay
        a0000000 00000088    63 	nop
                             64 
        94100720 0000008c    65 	mov		0x0720,		r16
        0de08080 00000090    66 	st.b		r16,		0x80(r15)	// Store 20 to port 80
        1e408098 00000094    67 	st.s		r16,		screen_offs(r18)
        9410072a 00000098    68 	mov		0x072A,		r16
        1e40809a 0000009c    69 	st.s		r16,		screen_offs+2(r18)
                             70 
        6bfffff1 000000a0    71 	br		loop
                             72 
        a0000000 000000a4    73 	nop
                             74 
                             75 
                             76 delay::
        9405ffff 000000a8    77 	mov		-1,		r5
ecc6001ee4068480 000000ac    78 	mov		delay_count,	r6
        b4c02801 000000b4    79 	bla		r5,	r6,	delay_loop
        a0000000 000000b8    80 	nop
                             81 
                             82 delay_loop:
        b4df2fff 000000bc    83 	bla		r5,	r6,	delay_loop
        a0000000 000000c0    84 	nop
                             85 
        40000800 000000c4    86 	bri		r1
        a0000000 000000c8    87 	nop
                             88 
                             89 
                             90 //The following cache flush procedure is from the 860TM programmer's reference
                             91 //manual.  Please reference the manual for additional information.
                             92 	
                             93 flush_cache::
        a0220000 000000cc    94 	mov		r1,	r2
                             95 	
                             96 //	rw=r24,	rx=r25,	ry=r26,	rz=r27
                             97 
        305b0000 000000d0    98 	ld.c    	dirbase,	r27
        e77b0800 000000d4    99 	or      	0x800,	r27,	r27
        9419ffff 000000d8   100 	adds    	-1,	r0,	r25
        6c000008 000000dc   101 	call    	D_FLUSH
        3840d800 000000e0   102 	st.c    	r27,	dirbase
        e77b0900 000000e4   103 	or      	0x900,	r27,	r27
        6c000005 000000e8   104 	call    	D_FLUSH
        3840d800 000000ec   105 	st.c    	r27,	dirbase
        f77b0900 000000f0   106 	xor     	0x900,	r27,	r27
                            107 
        a0410000 000000f4   108 	mov		r2,		r1
        40000800 000000f8   109 	bri     	r1
        3840d800 000000fc   110 	st.c    	r27,		dirbase
i860 ASSEMBLER, Beta Version 2.1, August 18th, 1989
Mon Mar 11 15:25:34 1991        Page 3



                            111 
                            112 D_FLUSH::
        e418ffe0 00000100   113 	or      	l%FLUSH_P,	r0,	r24
        ef18fffd 00000104   114 	orh     	h%FLUSH_P,	r24,	r24
        e41a007f 00000108   115 	or      	127,	r0,	r26
        171f0021 0000010c   116 	ld.l    	32(r24),	r31
        a7ff0000 00000110   117 	shl		0,	r31,	r31
        b740c802 00000114   118 	bla     	r25,	r26,	D_FLUSH_LOOP
        a0000000 00000118   119 	nop
                            120 
        a0000000 0000011c   121 	.align      32
                            122 
                            123 D_FLUSH_LOOP::
        08000000 00000120   124 	ixfr		r0,	f0
        b75fcffe 00000124   125 	bla     	r25,	r26,	D_FLUSH_LOOP
        37000021 00000128   126 	flush   	32(r24)++
        08000000 0000012c   127 	ixfr		r0,	f0
                            128 
        40000800 00000130   129 	bri		r1
        1700fe01 00000134   130 	ld.l		-512(r24),	r0
                            131 
        a0000000 00000138   132 	nop
        a0000000 0000013c   133 	nop
        a0000000 00000140   134 	nop
        a0000000 00000144   135 	nop
        a0000000 00000148   136 	nop
        a0000000 0000014c   137 	nop
                            138 
                 00000150   139 .end
        08000000 0000012c   127 	ixfr		r0,	f0
                            
[ RETURN TO DIRECTORY ]