CPU-Z80-Disassembler

 view release on metacpan or  search on metacpan

t/data/zx48_benchmark.asm  view on Meta::CPAN

; if variables exist, then the first character of any variable name.

;; LINE-ZERO

LINE_ZERO:
        defb $00, $00           ; dummy line number used for direct commands


;; LINE-NO-A

LINE_NO_A:
        ex de, hl               ; fetch the previous line to HL and set
        ld de, LINE_ZERO        ; DE to LINE-ZERO should HL also fail.

; -> The Entry Point.

;; LINE-NO

LINE_NO:
        ld a, (hl)              ; fetch the high byte - max $2F
        and $C0                 ; mask off the invalid bits.
        jr nz, LINE_NO_A        ; to LINE-NO-A if an end-marker.

        ldi d, (hl)             ; reload the high byte.
                                ; advance address.
        ld e, (hl)              ; pick up the low byte.
        ret                     ; return from here.


; -------------------
; Handle reserve room
; -------------------
; This is a continuation of the restart BC-SPACES

;; RESERVE

RESERVE:
        ld hl, (STKBOT)         ; STKBOT first location of calculator stack
        dec hl                  ; make one less than new location
        call MAKE_ROOM          ; routine MAKE-ROOM creates the room.
        inc hl                  ; address the first new location
        inc hl                  ; advance to second
        pop bc                  ; restore old WORKSP
        ld (WORKSP), bc         ; system variable WORKSP was perhaps
                                ; changed by POINTERS routine.
        pop bc                  ; restore count for return value.
        ex de, hl               ; switch. DE = location after first new space
        inc hl                  ; HL now location after new space
        ret                     ; return.


; ---------------------------
; Clear various editing areas
; ---------------------------
; This routine sets the editing area, workspace and calculator stack
; to their minimum configurations as at initialization and indeed this
; routine could have been relied on to perform that task.
; This routine uses HL only and returns with that register holding
; WORKSP/STKBOT/STKEND though no use is made of this. The routines also
; reset MEM to its usual place in the systems variable area should it
; have been relocated to a FOR-NEXT variable. The main entry point
; SET-MIN is called at the start of the MAIN-EXEC loop and prior to
; displaying an error.

;; SET-MIN

SET_MIN:
        ld hl, (E_LINE)         ; fetch E_LINE
        ld (hl), $0D            ; insert carriage return
        ld (K_CUR), hl          ; make K_CUR keyboard cursor point there.
        inc hl                  ; next location
        ldi (hl), $80           ; holds end-marker $80
                                ; next location becomes
        ld (WORKSP), hl         ; start of WORKSP

; This entry point is used prior to input and prior to the execution,
; or parsing, of each statement.

;; SET-WORK

SET_WORK:
        ld hl, (WORKSP)         ; fetch WORKSP value
        ld (STKBOT), hl         ; and place in STKBOT

; This entry point is used to move the stack back to its normal place
; after temporary relocation during line entry and also from ERROR-3

;; SET-STK

SET_STK:
        ld hl, (STKBOT)         ; fetch STKBOT value
        ld (STKEND), hl         ; and place in STKEND.

        push hl                 ; perhaps an obsolete entry point.
        ld hl, MEMBOT           ; normal location of MEM-0
        ld (MEM), hl            ; is restored to system variable MEM.
        pop hl                  ; saved value not required.
        ret                     ; return.


; ------------------
; Reclaim edit-line?
; ------------------
; This seems to be legacy code from the ZX80/ZX81 as it is 
; not used in this ROM.
; That task, in fact, is performed here by the dual-area routine CLEAR-SP.
; This routine is designed to deal with something that is known to be in the
; edit buffer and not workspace.
; On entry, HL must point to the end of the something to be deleted.

;; REC-EDIT

REC_EDIT:
        ld de, (E_LINE)         ; fetch start of edit line from E_LINE.
        jp RECLAIM_1            ; jump forward to RECLAIM-1.


; --------------------------
; The Table INDEXING routine
; --------------------------
; This routine is used to search two-byte hash tables for a character
; held in C, returning the address of the following offset byte.
; if it is known that the character is in the table e.g. for priorities,
; then the table requires no zero end-marker. If this is not known at the
; outset then a zero end-marker is required and carry is set to signal
; success.

;; INDEXER-1

INDEXER_1:
        inc hl                  ; address the next pair of values.

; -> The Entry Point.

;; INDEXER

INDEXER:
        ld a, (hl)              ; fetch the first byte of pair
        and a                   ; is it the end-marker ?
        ret z                   ; return with carry reset if so.

        cp c                    ; is it the required character ?
        inc hl                  ; address next location.
        jr nz, INDEXER_1        ; back to INDEXER-1 if no match.

        scf                     ; else set the carry flag.

t/data/zx48_benchmark.asm  view on Meta::CPAN


; $7C - Character: '|'          CHR$(124)

        defb %00000000
        defb %00001000
        defb %00001000
        defb %00001000
        defb %00001000
        defb %00001000
        defb %00001000
        defb %00000000

; $7D - Character: '}'          CHR$(125)

        defb %00000000
        defb %01110000
        defb %00010000
        defb %00001100
        defb %00010000
        defb %00010000
        defb %01110000
        defb %00000000

; $7E - Character: '~'          CHR$(126)

        defb %00000000
        defb %00010100
        defb %00101000
        defb %00000000
        defb %00000000
        defb %00000000
        defb %00000000
        defb %00000000

; $7F - Character: ' © '        CHR$(127)

        defb %00111100
        defb %01000010
        defb %10011001
        defb %10100001
        defb %10100001
        defb %10011001
        defb %01000010
        defb %00111100



;#end                            ; generic cross-assembler directive 

; Acknowledgements
; -----------------
; Sean Irvine               for default list of section headings
; Dr. Ian Logan             for labels and functional disassembly.
; Dr. Frank O'Hara          for labels and functional disassembly.
;
; Credits
; -------
; Alex Pallero Gonzales     for corrections.
; Mike Dailly               for comments.
; Alvin Albrecht            for comments.
; Andy Styles               for full relocatability implementation and testing.                    testing.
; Andrew Owen               for ZASM compatibility and format improvements.

;   For other assemblers you may have to add directives like these near the 
;   beginning - see accompanying documentation.
;   ZASM (MacOs) cross-assembler directives. (uncomment by removing ';' )
;   #target rom           ; declare target file format as binary.
;   #code   0,$4000       ; declare code segment.
;   Also see notes at Address Labels 0609 and 1CA5 if your assembler has 
;   trouble with expressions.
;
;   Note. The Sinclair Interface 1 ROM written by Dr. Ian Logan and Martin 
;   Brennan calls numerous routines in this ROM.  
;   Non-standard entry points have a label beginning with X. 



; $0000 CCCCCCCCCCCCCCCCCCCBBBBBCCCCCCCCCCCCCBBBCCCBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
; $0050 CCCCCCCCCCCCCCCBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCBBBBBBBBBBB
; $00A0 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
; $00F0 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
; $0140 BBBBBBBBBBBBBB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