Browse Source

endbss - begbss is no longer computable by the assembler

ceriel 37 years ago
parent
commit
5cf0d8b280
1 changed files with 7 additions and 1 deletions
  1. 7 1
      mach/i80/libmon/head_em.s

+ 7 - 1
mach/i80/libmon/head_em.s

@@ -12,8 +12,14 @@
 .sect .text
 	lxi h,0x1000		! stack will grow from 0x1000 downwards
 	sphl
+	lxi d,endbss
 	lxi h,begbss		! clear bss
-	lxi d,endbss-begbss
+	mov a,e
+	sub l
+	mov e,a
+	mov a,d
+	sbb h
+	mov d,a			! de now contains endbss - begbss
 	mvi c,0
 
 2:	mov m,c