🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Helmut Knirsch Fri, 25 May 1990 12:16
Lang keinen cc Bug mehr gehabt
#150
Author: Helmut Knirsch
Date: Fri, 25 May 1990 12:16
115 lines
3775 bytes
Es waere schoen wenn bei PCS jemand sagen koennte, welche Konstrukte
zu meiden sind, um die folgende compiler generierte Endlosschleife
zu umgehen :-)

Der folgende Abschnitt ist aus X11/lib/Xmu/Lower.c:

=====================================================================
1    #define  XK_LATIN1
2    #include <X11/keysymdef.h>
3    
4    /*
5     * ISO Latin-1 case conversion routine
6     */
7    
8    void
9    XmuCopyISOLatin1Lowered(dst, src)
10       char *dst, *src;
11   {
12       register unsigned char *dest, *source;
13   
14       for (dest = (unsigned char *)dst, source = (unsigned char *)src;
15   	 *source;
16   	 *source++, *dest++)
17       {
18   	if ((*source >= XK_A) && (*source <= XK_Z))
19   	    *dest = *source + (XK_a - XK_A);
20   	else if ((*source >= XK_Agrave) && (*source <= XK_Odiaeresis))
21   	    *dest = *source + (XK_agrave - XK_Agrave);
22   	else if ((*source >= XK_Ooblique) && (*source <= XK_Thorn))
23   	    *dest = *source + (XK_oslash - XK_Ooblique);
24   	else
25   	    *dest = *source;
26       }
27       *dest = '\0';
28   }
=====================================================================

Die Zeile 16 wird aber vom cc leider nicht beruecksichtigt, denn sonst
waere in der Naehe von L19 etwas wie movb a4@+,d1 movb a5@+,d2 zu finden.
der cc (V.3.2/M-V.3.2Ab) aber macht daraus :

=====================================================================
	.text
	.even
	.globl	_XmuCopyISOLatin1Lowered
_XmuCopyISOLatin1Lowered:
	link	a6,#L10000		|     0:  4e5600009ffc00000000
	moveml	#M10001,a6@(-28)		|     a:  48ee38e0ffe4
	fmovem.x	#0xe0 -> a7@-		|    10:  f227e0e0
|line 33
	movl	a6@(8),a5		|    14:  2a6e0008
	movl	a6@(12),a4		|    18:  286e000c
	bra	L16		|    1c:  4e714ef900000000
L17:
|line 36
	cmpb	#65,a4@		|    24:  0c140041
	bcs	L18		|    28:  64064ef900000000
	cmpb	#90,a4@		|    30:  0c14005a
	bhi	L18		|    34:  63064ef900000000
|line 37
	clrl	d1		|    3c:  4281
	movb	a4@,d1		|    3e:  1214
	addl	#32,d1		|    40:  068100000020
	movb	d1,a5@		|    46:  1a81
	bra	L19		|    48:  4e714ef900000000
L18:
|line 38
	cmpb	#192,a4@		|    50:  0c1400c0
	bcs	L20		|    54:  64064ef900000000
	cmpb	#214,a4@		|    5c:  0c1400d6
	bhi	L20		|    60:  63064ef900000000
|line 39
	clrl	d1		|    68:  4281
	movb	a4@,d1		|    6a:  1214
	addl	#32,d1		|    6c:  068100000020
	movb	d1,a5@		|    72:  1a81
	bra	L21		|    74:  4e714ef900000000
L20:
|line 40
	cmpb	#216,a4@		|    7c:  0c1400d8
	bcs	L22		|    80:  64064ef900000000
	cmpb	#222,a4@		|    88:  0c1400de
	bhi	L22		|    8c:  63064ef900000000
|line 41
	clrl	d1		|    94:  4281
	movb	a4@,d1		|    96:  1214
	addl	#32,d1		|    98:  068100000020
	movb	d1,a5@		|    9e:  1a81
	bra	L23		|    a0:  4e714ef900000000
L22:
|line 43
	movb	a4@,a5@		|    a8:  1a94
L23:
L21:
L19:
|line 44
L16:
|line 44
	tstb	a4@		|    aa:  4a14
	bne	L17		|    ac:  67064ef900000000
L15:
|line 45
	clrb	a5@		|    b4:  4215
L13:
	moveml	a6@(-28),#M10001		|    b6:  4cee3000ffe4
	unlk	a6		|    bc:  4e5e
	rts			|    be:  4e75
L10000=-28
M10001=0x3000
F10001=0x0
	.data
	.even
	.even
	.even
=====================================================================
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads