80-Bus News

  

May-June 1984, Volume 3, Issue 3











Page 26 of 51











Dis-assembly of NASCOM ROM BASIC Ver 4.7                PAGE    96

FD9B AF         DELAY:  XOR     A               ; Delay routine
FD9C F5         DELAY1: PUSH    AF              ; PUSHes and POPs delay
FD9D F1                 POP     AF
FD9E F5                 PUSH    AF
FD9F F1                 POP     AF
FDA0 3D                 DEC     A               ; Count delays
FDA1 C29CFD             JP      NZ,DELAY1       ; More delay
FDA4 C9                 RET

FDA5 CD84F4     WIDTH:  CALL    GETINT          ; Get integer 0-255
FDA8 7B                 LD      A,E             ; Width to A
FDA9 324210             LD      (LWIDTH),A      ; Set width
FDAC C9                 RET

FDAD CD41ED     LINES:  CALL    GETNUM          ; Get a number
FDB0 CD8BE9             CALL    DEINT           ; Get integer -32768 to 32767
FDB3 ED534610           LD      (LINESC),DE     ; Set lines counter
FDB7 ED534810           LD      (LINESN),DE     ; Set lines number
FDBB C9                 RET

FDBC CD8BE9     DEEK:   CALL    DEINT           ; Get integer -32768 to 32767
FDBF D5                 PUSH    DE              ; Save number
FDC0 E1                 POP     HL              ; Number to HL
FDC1 46                 LD      B,(HL)          ; Get LSB of contents
FDC2 23                 INC     HL
FDC3 7E                 LD      A,(HL)          ; Get MSB of contents
FDC4 C3F2F0             JP      ABPASS          ; Return integer AB

FDC7 CD41ED     DOKE:   CALL    GETNUM          ; Get a number
FDCA CD8BE9             CALL    DEINT           ; Get integer -32768 to 32767
FDCD D5                 PUSH    DE              ; Save address
FDCE CD90E6             CALL    CHKSYN          ; Make sure "," follows
FDD1 2C                 DEFB    ","
FDD2 CD41ED             CALL    GETNUM          ; Get a number
FDD5 CD8BE9             CALL    DEINT           ; Get integer -32768 to 32767
FDD8 E3                 EX      (SP),HL         ; Save value,get address
FDD9 73                 LD      (HL),E          ; Save LSB of value
FDDA 23                 INC     HL
FDDB 72                 LD      (HL),D          ; Save MSB of value
FDDC E1                 POP     HL              ; Restore code string address
FDDD C9                 RET

FDDE F3         JJUMP1: DI                      ; Disable interrupts
FDDF DD21FFFF           LD      IX,-1           ; Flag cold start
FDE3 C312E0             JP      CSTART          ; Go and initialise

Dis-assembly of NASCOM ROM BASIC Ver 4.7                PAGE    97

FDE6 CD84F4     SCREEN: CALL    GETINT          ; Get integer 0 to 255
FDE9 F5                 PUSH    AF              ; Save column
FDEA CD90E6             CALL    CHKSYN          ; Make sure "," follows
FDED 2C                 DEFB    ","
FDEE CD84F4             CALL    GETINT          ; Get integer 0 to 255
FDF1 C1                 POP     BC              ; Column to B
FDF2 E5                 PUSH    HL              ; Save code string address
FDF3 C5                 PUSH    BC              ; Save column
FDF4 CD11FE             CALL    SCRADR          ; Calculate screen address
FDF7 E5                 PUSH    HL              ; Save screen address
FDF8 CD6DFE             CALL    MONTST          ; See if NAS-SYS
FDFB CA04FE             JP      Z,TMNCUR        ; "T" monitor - "T" cursor
FDFE E1                 POP     HL              ; Restore screen address
FDFF 22290C             LD      (CURSOR),HL     ; Set new cursor position
FE02 E1                 POP     HL              ; Rstore code string address
FE03 C9                 RET

FE04 2A180C     TMNCUR: LD      HL,(TCUR)       ; Get address or cursor
FE07 3620               LD      (HL)," "        ; Remove cursor
FE09 E1                 POP     HL              ; Get new cursor address
FE0A 22180C             LD      (TCUR),HL       ; Set new cursor
FE0D 365F               LD      (HL),"_"        ; Put it on screen
FE0F E1                 POP     HL              ; Restore code string address
FE10 C9                 RET

FE11 21C907     SCRADR: LD      HL,VDU+10-65    ; SCREEN VDU address (0,0)
FE14 0600               LD      B,0
FE16 4F                 LD      C,A             ; Line to BC
FE17 B7                 OR      A               ; Test it
FE18 CAA0E9             JP      Z,FCERR         ; Zero - ?FC Error
FE1B FE11               CP      16+1            ; 16 lines
FE1D F2A0E9             JP      P,FCERR         ; > 16 - ?FC Error
FE20 D1                 POP     DE              ; RETurn address
FE21 F1                 POP     AF              ; Get column
FE22 D5                 PUSH    DE              ; Re-save RETurn
FE23 1600               LD      D,0
FE25 5F                 LD      E,A             ; Column to DE
FE26 B7                 OR      A               ; Test it
FE27 CAA0E9             JP      Z,FCERR         ; Zero - ?FC Error
FE2A FE31               CP      48+1            ; 48 characters per line
FE2C F2A0E9             JP      P,FCERR         ; > 48 - ?FC Error
FE2F 19                 ADD     HL,DE           ; Add column to address
FE30 1600               LD      D,0
FE32 59                 LD      E,C             ; Line to DE
FE33 0640               LD      B,64            ; 64 Bytes per line
FE35 19         ADD64X: ADD     HL,DE           ; Add line
FE36 10FD               DJNZ    ADD64X          ; SIXTY FOUR TIMES!!!
FE38 C9                 RET

FE39 CD6DFE     FLPLED: CALL    MONTST          ; See if NAS-SYS
FE3C CA42FE             JP      Z,TMFLP         ; "T" MFLP
FE3F DF5F               SCAL    MFLP
FE41 C9                 RET

FE42 C35100     TMFLP:  JP      MFLP            ; Flip drive LED


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 26 of 51