Procházet zdrojové kódy

Changes from Nigel Hall

ceriel před 36 roky
rodič
revize
7f5dfa7bb2

+ 55 - 55
mach/6500/libem/LIST

@@ -1,94 +1,94 @@
 libem_s.a
-adi.s
 adi4.s
+cmi.s
+cmi4.s
+sbi4.s
+addsub.s
+cmu4.s
+dum_float.s
+dvi4.s
+dvu4.s
+lar.s
+lol.s
+los.s
+loil.s
+loi1.s
+loi.s
+mli4.s
+mlu.s
+mlu4.s
+mul4.s
+mon.s
+write.s
+printstack.s
+printhex.s
+rmi.s
+rmi4.s
+div4.s
+rmu.s
+dvi.s
+rmu4.s
+duv4.s
+ngi4.s
+rtt.s
+ret.s
+sar.s
+aar.s
+adi.s
+sbi.s
+mli.s
+ngi.s
+set.s
+zer.s
+stl.s
+sts.s
+sdl.s
+sti.s
+stil.s
+blm.s
+sti1.s
+test2.s
+testFFh.s
+trap.s
+ldi.s
+data.s
+print.s
+zri.s
+locaddr.s
 and.s
 asp.s
 cii.s
-cmi.s
-cmi4.s
 cms.s
 cmu.s
-cmu4.s
 com.s
 csa.s
 csb.s
 dup.s
-dvi.s
-dvi4.s
 dvu.s
-dvu4.s
 exg.s
 exg2.s
 gto.s
 indir.s
 inn.s
 ior.s
-lar.s
 lcs.s
-loi.s
-loi1.s
-loil.s
-lol.s
-los.s
 lxa1.s
 lxa2.s
 lxl.s
-mli4.s
-mlu.s
-mlu4.s
-mon.s
-mul4.s
-ngi4.s
-printstack.s
-printhex.s
 pro.s
 read.s
-ret.s
-rmi.s
-rmi4.s
-div4.s
-rmu.s
-rmu4.s
-duv4.s
 rol.s
 rol4.s
 ror.s
 ror4.s
-rtt.s
-sar.s
-mli.s
-ngi.s
-sbi4.s
-addsub.s
-sdl.s
-set.s
 sli.s
 sli4.s
 sri.s
 sri4.s
-sti.s
-sti1.s
-stil.s
-blm.s
-stl.s
-sts.s
 teq.s
-test2.s
-testFFh.s
 tge.s
 tgt.s
 tle.s
 tlt.s
 tne.s
-dum_float.s
-trap.s
-ldi.s
-print.s
-write.s
 xor.s
-zer.s
-zri.s
-locaddr.s
-data.s
-aar.s
-sbi.s

+ 1 - 1
mach/6500/libem/addsub.s

@@ -26,7 +26,7 @@ Addsub:
 	sta ADDR+3	! address of first operand (highbyte)
 	sta SP+1
 	ldy #0
-	ldx #0FCh	! do it 4 times
+	ldx #0x0FC	! do it 4 times
 	rts
 
 

+ 1 - 1
mach/6500/libem/cii.s

@@ -30,7 +30,7 @@ Cii:
 	lda #0		! no sign extension here
 	tax
 	beq 2f
-    1:	lda #0FFh	! sign extension here
+    1:	lda #0x0FF	! sign extension here
 	tax
     2:	jsr Push	! push twobyte integer
 	pla

+ 1 - 1
mach/6500/libem/cmi.s

@@ -15,7 +15,7 @@
 Cmi:
 	jsr Sbi2	! subtract operands (T - S)
 	bpl 1f		! S >= T
-	lda #0FFh	! S < T
+	lda #0x0FF	! S < T
 	tax		! AX becomes -1
 	rts
     1:	beq 2f

+ 1 - 1
mach/6500/libem/cmi4.s

@@ -20,7 +20,7 @@ Cmi4:
 	jsr Pop		! get result (lowbyte+2, lowbyte+3)
 	tay		! test lowbyte+3
 	bpl 1f		! S >= T
-	lda #0FFh	! S < T
+	lda #0x0FF	! S < T
 	tax		! AX becomes -1
 	rts
     1:	cmp #0		! test lowbyte+3 on zero

+ 1 - 1
mach/6500/libem/cmu.s

@@ -21,7 +21,7 @@ Cmu2:
     4:	lda #0		! S > T
 	ldx #1
 	rts
-    1:	lda #0FFh	! S < T
+    1:	lda #0xFF	! S < T
 	tax
 	rts
     2:	cpx EXG

+ 1 - 1
mach/6500/libem/cmu4.s

@@ -43,7 +43,7 @@ Cmu4:
     2:	lda #0		! S > T
 	ldx #1
 	rts
-    3:	lda #0FFh	! S < T
+    3:	lda #0x0FF	! S < T
 	tax
 	rts
 

+ 1 - 1
mach/6500/libem/com.s

@@ -17,7 +17,7 @@ Com:
 	sta ADDR	! address (lowbyte) of first byte
     1:	dey
     	lda (ADDR),y
-	eor #0FFh	! one complement
+	eor #0x0FF	! one complement
 	sta (ADDR),y
 	tya
 	bne 1b		! do it n times

+ 8 - 8
mach/6500/libem/head_em.s

@@ -21,11 +21,11 @@
 	! The next three definitions are special for the
 	! BBC microcomputer
 
-WRCH	= 0FFEEh	! This subroutine writes the character in
+WRCH	= 0x0FFEE	! This subroutine writes the character in
 			! register A to the screen
-RDCH	= 0FFE0h	! This subroutine returns a character in
+RDCH	= 0x0FFE0	! This subroutine returns a character in
 			! register A from the current input stream
-OSBYTE	= 0FFF4h	! This subroutine performs miscelaneous
+OSBYTE	= 0x0FFF4	! This subroutine performs miscelaneous
 			! operating system calls
 
 F_DUM	= 0		! Dummy floating point constant
@@ -47,13 +47,13 @@ Ecase	= 20
 Ebadmon = 25
 Ebadlin = 26
 Ebadgto = 27
-MON = 78D0h
+MON = 0x78D0
 
 BASE	= 240		! This is the offset from the localbase
 			! for the second localbase
 
-STACKTh = 78h		! This is the top of the stack
-STACKTl = 0D0h
+STACKTh = 0x78		! This is the top of the stack
+STACKTl = 0x0D0
 
 	! Some zeropage declarations
 
@@ -104,7 +104,7 @@ STACK: .space 1		! contains the hardware stackpointer on
 RESERVED: .space 112    ! used by the operating system
 
 .sect .text
-.base 0E02h		! where to start in the BBC micro
+.base 0x0E02		! where to start in the BBC micro
 ! GENERAL PURPOSE ROUTINES
 
 start:
@@ -176,7 +176,7 @@ start:
 	jsr Push	! push argc 
     	jsr _m_a_i_n	! start the real program
 
-	lda #0FFh
+	lda #0x0FF
 	jsr WRCH	! send end of program to R423
 	lda #3
 	ldx #0

+ 2 - 2
mach/6500/libem/inn.s

@@ -12,13 +12,13 @@
 Inn:
 	stx ARTH	! save bit number (lowbyte)
 	sta ARTH+1	! save bit number (highbyte)
-	and #80h
+	and #0x80
 	beq 1f
 	lda #0		! bit number is negative
 	sta ARTH+2	! make it zero
 	beq 3f
     1:	txa
-	and #07h	! get bit number mod 8
+	and #0x07	! get bit number mod 8
 	tax
 	lda #1
 	cpx #0		! bit number = 0

+ 3 - 3
mach/6500/libem/mli.s

@@ -39,7 +39,7 @@ Mul:
 	sta ARTH+6
 	sta ARTH+7	! clear accumulator
     	ldy #16
-    1:	lda #1h
+    1:	lda #0x01
 	bit ARTH
 	beq 2f		! multiplying by zero: no addition
 	clc
@@ -59,11 +59,11 @@ Mul:
 	beq 3f		! unsigned multiply: so no shift in of signbit
 	lda ARTH+3
 	bpl 3f
-	lda #40h
+	lda #0x40
 	bit ARTH+7
 	beq 3f
 	lda ARTH+7
-	ora #80h
+	ora #0x80
 	sta ARTH+7
     3:	dey
 	bne 1b

+ 3 - 3
mach/6500/libem/mul4.s

@@ -21,7 +21,7 @@ Mul4:
 	sta ARTH+14
 	sta ARTH+15	! clear accumulator
     	ldy #32
-    1:	lda #1h
+    1:	lda #0x01
 	bit ARTH
 	beq 2f		! multiplying by zero: no addition
 	clc
@@ -53,11 +53,11 @@ Mul4:
 	beq 3f		! it's unsigned: so no shift in of signbit
 	lda ARTH+7
 	bpl 3f
-	lda #40h
+	lda #0x40
 	bit ARTH+15
 	beq 3f
 	lda ARTH+15
-	ora #80h
+	ora #0x80
 	sta ARTH+15
     3:	dey
 	bne 1b

+ 2 - 2
mach/6500/libem/ngi.s

@@ -10,10 +10,10 @@
 
 
 Ngi2:
-	eor #0FFh	! one's complement A
+	eor #0x0FF	! one's complement A
 	tay
 	txa
-	eor #0FFh	! one's complement X
+	eor #0x0FF	! one's complement X
 	tax
 	inx		! increment X
 	bne 1f

+ 2 - 2
mach/6500/libem/ngi4.s

@@ -14,11 +14,11 @@ Ngi4:
 	stx ADDR
 	ldy #3
     1:	lda (ADDR),y
-	eor #0FFh	! one's complement lowbyte+y
+	eor #0x0FF	! one's complement lowbyte+y
 	sta (ADDR),y
 	dey
 	bpl 1b
-	ldx #0FDh
+	ldx #0x0FD
 	iny
 	clc
     	lda (ADDR),y

+ 3 - 3
mach/6500/libem/printhex.s

@@ -19,13 +19,13 @@ Printhex:
 	lsr a		! get four high bits
 	jsr 1f
 	pla		! restore A
-	and #0Fh	! get four low bits
+	and #0x0F	! get four low bits
 	jsr 1f
 	rts
     1:	sed		! print in hex
 	clc
-	adc #90h
-	adc #40h
+	adc #0x90
+	adc #0x40
 	cld
 	jmp WRCH
 

+ 1 - 1
mach/6500/libem/ror.s

@@ -21,7 +21,7 @@ Ror:
 	ror a		! rotate highbyte
 	ror Ytmp	! rotate lowbyte
 	bcc 1f		! no carry
-	ora #80h	! put carry in leftmost bit
+	ora #0x80	! put carry in leftmost bit
     1:	dey
 	bne 2b
 	ldx Ytmp	! get lowbyte

+ 1 - 1
mach/6500/libem/ror4.s

@@ -25,7 +25,7 @@ Ror4:
 	ror ARTH+1
 	ror ARTH
 	bcc 1f		! no carry
-	lda #80h	! put carry in leftmost bit
+	lda #0x80	! put carry in leftmost bit
 	ora ARTH+3
 	sta ARTH+3
     1:	dey

+ 1 - 1
mach/6500/libem/set.s

@@ -15,7 +15,7 @@ Set:
 	sta ARTH+1	! save bitnumber (highbyte)
 	jsr Zer		! create n zerobytes
 	lda ARTH
-	and #07h	! n mod 8 (bitnumber in byte)
+	and #0x07	! n mod 8 (bitnumber in byte)
 	tax
 	lda #1
 	cpx #0