https://github.com/cheveron/open81
This generates the standard version 2 ROM. I've created a static branch for that version in case anyone wants to create pull requests for merging into the master branch.
A new modular version of the Open81 assembly file is now available
Re: A new modular version of the Open81 assembly file is now available
Good job and thanks for sharing
Claudius
----------
----------
Re: A new modular version of the Open81 assembly file is now available
You're welcome! I'm currently back-porting some of the improvements and comments from SE Basic IV (which is based on the ZX81 ROM). I'm aware of the ZX81X2 project and I'm hoping to include some of those improvements, although the square root function in SE Basic IV is shorter and faster (it's from the SAM Coupe ROM by Andy Wright).
Re: A new modular version of the Open81 assembly file is now available
I've been through the code and I've now created version 2.5. This retains all the entry points prior to calculate. It's roughly equivalent to sg81.rom but it fixes an additional bug in division (1/4<>0.25) and includes the super-fast square root and faster stack pointers routines from SE Basic IV. There are now 19 spare bytes before the font. More details in the changelog.
Re: A new modular version of the Open81 assembly file is now available
Hi,
This implementation of the Babylonian (or Heron's) square root method is very cool.
I built a new variant of the X2 ROM with it, and the test results are fantastic: this is ~2x faster than the Newton-Raphson iteration in the latest "BigBang" ROM.
Thank you for sharing.
About the "stack pointers" routine - i have a shorter/faster one:
Both routines will be included in the next X2 ROM variant (coming soon).
Thanks again,
Zsolt
This implementation of the Babylonian (or Heron's) square root method is very cool.
I built a new variant of the X2 ROM with it, and the test results are fantastic: this is ~2x faster than the Newton-Raphson iteration in the latest "BigBang" ROM.
Thank you for sharing.
About the "stack pointers" routine - i have a shorter/faster one:
Code: Select all
;
; ---------------------------------------
; THE original 'STACK POINTERS' ROUTINE (10B/72Ts)
; ---------------------------------------
; Register DE is set to STKEND and HL, the result pointer, is set to five
; locations below this - the 'last value'.
; This routine is used when it is inconvenient to save these values at the
; time the calculator stack is manipulated due to other activity on the
; machine stack.
; This routine is also used to terminate the VAL routine for
; the same reason and to initialize the calculator stack at the start of
; the CALCULATE routine.
;
;; STK-PNTRS
L1B85: LD HL,($401C) ; fetch STKEND value from system variable.
LD DE,$FFFB ; the value -5
PUSH HL ; push STKEND value.
ADD HL,DE ; subtract 5 from HL.
POP DE ; pop STKEND to DE.
RET ; return.
;
; ---------------------------------------------
; THE 'STK_PNTRS' SUBROUTINE from open81 v2.5 (11B/68Ts)
; ---------------------------------------------
stk_pntrs:
ld hl,(stkend) ; stack end to HL
stk_pntrs_2:
ld e,l ; DE points to second
ld d,h ; operand
dec hl ; make
dec hl ; HL
dec hl ; point
dec hl ; to first
dec hl ; operand
ret ; end of subroutine
;
; ----------------------------------
; THE new 'STACK POINTERS' ROUTINE (9B/55Ts)
; ----------------------------------
;
STK_PNTRS
LD HL,($401C) ; fetch STKEND value from system variable.
stk_pntrs_2:
ex de,hl ; switch pointers: DE = STKEND
ld hl,$FFFB ; the value -5
ADD HL,DE ; HL = STKEND - 5
ret ; return.
Thanks again,
Zsolt
ZX81 (8K), ENTERPRISE 128, [ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]
Re: A new modular version of the Open81 assembly file is now available
kiváló!
My EPROM burner is ready!
My EPROM burner is ready!