[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] [PATCH] XaAES nkcc sync from cflib



Hello.

I have just noticed that nkcc was duplicated from the cflib to XaAES. This is ugly but currently things are like that. I have also spotted some differences, so here is a tiny patch for XaAES to keep in sync with cflib's nkcc.

Helmut, please commit!

nkcc.patch
Synchronized NKCC from CFLIB. Contributed by Vincent Riviere.

--
Vincent Rivière
diff -x CVS -aurN freemint.orig/xaaes/src.km/nkcc-gc.S freemint.work/xaaes/src.km/nkcc-gc.S
--- freemint.orig/xaaes/src.km/nkcc-gc.S	2011-05-16 10:43:20.000000000 +0200
+++ freemint.work/xaaes/src.km/nkcc-gc.S	2011-08-01 18:25:48.687500000 +0200
@@ -167,6 +167,8 @@
 _nkc_init:
 |------------- fetch addresses of TOS' key scan code translation tables
 
+	movel	a2,sp@-			| backup registers
+	movel	d2,sp@-
 	moveql	#-1,d0			| the function is also used to
 	movel	d0,sp@- 		| change the addresses| values
 	movel	d0,sp@- 		| of -1 as new addresses tell
@@ -180,8 +182,9 @@
 	movel	a0@+,pkey_shift 	| get ^shifted table
 	movel	a0@,pkey_caps		| get ^CapsLock table
 
-exit1:
 	movew	#VERSION,d0		| load version #
+	movel	sp@+,d2			| restore registers
+	movel	sp@+,a2
 	rts				| bye
 
 |***************************************************************************