changeset 159:7c198e6716e4

C123 bootloader re complete
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 15 May 2014 07:58:07 +0000
parents 8ed06e07b19e
children db3b300da465
files compal/c123-boot.disasm
diffstat 1 files changed, 38 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/compal/c123-boot.disasm	Thu May 15 06:43:14 2014 +0000
+++ b/compal/c123-boot.disasm	Thu May 15 07:58:07 2014 +0000
@@ -104,6 +104,7 @@
 ; stack address, varies by version
      964:	0083e424
 
+; 0x968 routine same as in the C139 version
      968:	4961		ldr	r1, =0xfffffa08	; via 0xaf0
      96a:	4862		ldr	r0, =0xffff	; via 0xaf4
      96c:	8008		strh	r0, [r1, #0]
@@ -299,6 +300,8 @@
      b1c:	e12fff1e	bx	lr
      b20:	e1a00000	mov	r0, r0
 
+; 0xb24 function appears to be the same as in the C139 version,
+; but calls 0xed4 instead of 0xf2c.
      b24:	b500		push	{lr}
      b26:	b082		sub	sp, #8
      b28:	49e8		ldr	r1, =0x83ff00	; via 0xecc
@@ -363,6 +366,8 @@
      ba6:	d3f4		bcc	0xb92
      ba8:	b002		add	sp, #8
      baa:	bd00		pop	{pc}
+
+; serial download protocol
      bac:	b500		push	{lr}
      bae:	b086		sub	sp, #24	; 0x18
      bb0:	48f3		ldr	r0, =0x800100	; via 0xf80
@@ -546,6 +551,7 @@
      d62:	f000 f85e	bl	0xe22
      d66:	b006		add	sp, #24	; 0x18
      d68:	bd00		pop	{pc}
+
      d6a:	b500		push	{lr}
      d6c:	b081		sub	sp, #4
      d6e:	2066		mov	r0, #102	; 0x66
@@ -618,7 +624,11 @@
      e1a:	f000 f803	bl	0xe24
      e1e:	b001		add	sp, #4
      e20:	bd00		pop	{pc}
+
+; corresponds to 0xe76 in the C139 version
      e22:	4708		bx	r1
+
+; UART character output routine, corresponds to 0xe78 in the C139 version
      e24:	b081		sub	sp, #4
      e26:	4669		mov	r1, sp
      e28:	7008		strb	r0, [r1, #0]
@@ -634,6 +644,7 @@
      e3c:	7001		strb	r1, [r0, #0]
      e3e:	b001		add	sp, #4
      e40:	46f7		mov	pc, lr
+
      e42:	4822		ldr	r0, =0x83ff00	; via 0xecc
      e44:	6800		ldr	r0, [r0, #0]
      e46:	7940		ldrb	r0, [r0, #5]
@@ -643,6 +654,8 @@
      e4e:	6800		ldr	r0, [r0, #0]
      e50:	7800		ldrb	r0, [r0, #0]
      e52:	4770		bx	lr
+
+; should correspond to 0xea8 in the C139 version
      e54:	b083		sub	sp, #12	; 0xc
      e56:	9000		str	r0, [sp, #0]
      e58:	9800		ldr	r0, [sp, #0]
@@ -670,6 +683,7 @@
      e84:	7800		ldrb	r0, [r0, #0]
      e86:	b003		add	sp, #12	; 0xc
      e88:	4770		bx	lr
+
      e8a:	b081		sub	sp, #4
      e8c:	e001		b	0xe92
      e8e:	9800		ldr	r0, [sp, #0]
@@ -703,10 +717,11 @@
      ec6:	b002		add	sp, #8
      ec8:	4770		bx	lr
      eca:	46c0		nop			(mov r8, r8)
-     ecc:	ff00		<half-bl>
-     ece:	0083		lsl	r3, r0, #2
-     ed0:	5800		ldr	r0, [r0, r0]
-     ed2:	ffff		<half-bl>
+
+     ecc:	0083ff00
+     ed0:	ffff5800
+
+; should be the same as 0xf2c in the C139 version
      ed4:	b081		sub	sp, #4
      ed6:	466a		mov	r2, sp
      ed8:	7051		strb	r1, [r2, #1]
@@ -789,12 +804,14 @@
      f72:	d2f5		bcs	0xf60
      f74:	b001		add	sp, #4
      f76:	4770		bx	lr
+
      f78:	480a		ldr	r0, =0x83ff80	; via 0xfa4
      f7a:	7800		ldrb	r0, [r0, #0]
      f7c:	4770		bx	lr
      f7e:	46c0		nop			(mov r8, r8)
-     f80:	0100		lsl	r0, r0, #4
-     f82:	0080		lsl	r0, r0, #2
+
+     f80:	00800100
+
      f84:	b500		push	{lr}
      f86:	b081		sub	sp, #4
      f88:	4669		mov	r1, sp
@@ -1549,6 +1566,8 @@
     156a:	8008		strh	r0, [r1, #0]
     156c:	b006		add	sp, #24	; 0x18
     156e:	4770		bx	lr
+
+; same as 0x15c8 in the C139 version
     1570:	4907		ldr	r1, =0x83ff08	; via 0x1590
     1572:	2000		mov	r0, #0
     1574:	6008		str	r0, [r1, #0]
@@ -1557,16 +1576,13 @@
     157a:	6001		str	r1, [r0, #0]
     157c:	4770		bx	lr
     157e:	46c0		nop			(mov r8, r8)
-    1580:	ff10		<half-bl>
-    1582:	0083		lsl	r3, r0, #2
-    1584:	ff04		<half-bl>
-    1586:	0083		lsl	r3, r0, #2
-    1588:	ff0e		<half-bl>
-    158a:	0083		lsl	r3, r0, #2
-    158c:	ff0c		<half-bl>
-    158e:	0083		lsl	r3, r0, #2
-    1590:	ff08		<half-bl>
-    1592:	0083		lsl	r3, r0, #2
+
+    1580:	0083ff10
+    1584:	0083ff04
+    1588:	0083ff0e
+    158c:	0083ff0c
+    1590:	0083ff08
+
     1594:	b082		sub	sp, #8
     1596:	9101		str	r1, [sp, #4]
     1598:	9000		str	r0, [sp, #0]
@@ -2359,8 +2375,11 @@
     1bd6:	7001		strb	r1, [r0, #0]
     1bd8:	4770		bx	lr
     1bda:	46c0		nop			(mov r8, r8)
-    1bdc:	ff14		<half-bl>
-    1bde:	0083		lsl	r3, r0, #2
+
+    1bdc:	0083ff14
+
+; hoping this routine will be the same as 0x1c38 in the C139 version
+; same length, looks the same on inspection
     1be0:	b081		sub	sp, #4
     1be2:	483f		ldr	r0, =0xffff5800	; via 0x1ce0
     1be4:	9000		str	r0, [sp, #0]
@@ -2449,6 +2468,7 @@
     1c8a:	7201		strb	r1, [r0, #8]
     1c8c:	b001		add	sp, #4
     1c8e:	4770		bx	lr
+
     1c90:	b081		sub	sp, #4
     1c92:	4669		mov	r1, sp
     1c94:	7008		strb	r0, [r1, #0]