added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / .unmaintained / m68k-native / layers / basicasmfuncs.s
blobaca77a8f357180ed30ae42f18a2cd75414fcaa0b
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "machine.i"
8 .text
9 .balign 4
11 .globl AROS_CDEFNAME(_BltRPtoCR)
12 .type AROS_CDEFNAME(_BltRPtoCR),@function
13 AROS_CDEFNAME(_BltRPtoCR):
14 movem.l d2-d7/a2-a3/a6,-(sp)
15 move.l a0,a2 /* rp */
16 move.l a1,a3 /* cr */
17 move.l d0,d6 /* mode (minterm) */
18 movea.l rp_BitMap(a2),a0 /* rp->BitMap */
19 move.w cr_MinX(a3),d0
20 ext.l d0 /* cr->bounds.MinX */
21 move.w cr_MinY(a3),d1
22 ext.l d1 /* cr->bounds.MinY */
23 movea.l cr_BitMap(a3),a1 /* cr->BitMap */
24 move.w cr_MinX(a3),d2
25 ext.l d2
26 moveq.l #0xf,d3
27 and.l d3,d2 /* cr->bounds.MinX & 0xf */
28 move.w cr_MinX(a3),d3
29 ext.l d3
30 move.w cr_MaxX(a3),d4
31 ext.l d4
32 sub.l d3,d4
33 addq.l #1,d4 /* cr->bounds.MaxX - cr->bounds.MinX + 1 */
34 move.w cr_MinY(a3),d3
35 ext.l d3
36 move.w cr_MaxX(a3),d5
37 ext.l d5
38 sub.l d3,d5
39 addq.l #1,d5 /* cr->bounds.MaxY - cr->bounds.MinY + 1 */
40 moveq.l #-1,d7 /* mask */
41 suba.l a2,a2 /* tempa */
42 movea.l lb_GfxBase(a6),a6 /* get GfxBase from LayersBase */
43 moveq.l #0,d3 /* dest y */
44 jsr BltBitMap(a6)
45 movem.l (sp)+,d2-d7/a2-a3/a6
46 rts
48 .globl AROS_CDEFNAME(_BltCRtoRP)
49 .type AROS_CDEFNAME(_BltCRtoRP),@function
50 AROS_CDEFNAME(_BltCRtoRP):
51 movem.l d2-d7/a2-a3/a6,-(sp)
52 move.l a0,a2 /* rp */
53 move.l a1,a3 /* cr */
54 move.l d0,d6 /* mode (minterm) */
55 movea.l cr_BitMap(a3),a0 /* rp->BitMap */
56 move.w cr_MinX(a3),d0
57 ext.l d0
58 moveq.l #0xf,d1
59 and.l d1,d0 /* cr->bounds.MinX & 0xf */
60 movea.l rp_BitMap(a2),a1 /* cr->BitMap */
61 move.w cr_MinX(a3),d2
62 ext.l d2 /* cr->bounds.MinX */
63 move.w cr_MinY(a3),d3
64 ext.l d3 /* cr->bounds.MinY */
65 move.w cr_MinX(a3),d1
66 ext.l d1
67 move.w cr_MaxX(a3),d4
68 ext.l d4
69 sub.l d1,d4
70 addq.l #1,d4 /* cr->bounds.MaxX - cr->bounds.MinX + 1 */
71 move.w cr_MinY(a3),d1
72 ext.l d1
73 move.w cr_MaxY(a3),d5
74 ext.l d5
75 sub.l d1,d5
76 addq.l #1,d5 /* cr->bounds.MaxY - cr->bounds.MinY + 1 */
77 moveq.l #-1,d7 /* mask */
78 suba.l a2,a2 /* tempa */
79 movea.l lb_GfxBase(a6),a6 /* get GfxBase from LayersBase */
80 moveq.l #0,d1 /* src y */
81 jsr BltBitMap(a6)
82 movem.l (sp)+,d2-d7/a2-a3/a6
83 rts