This page (revision-26) was last changed on 03-Feb-2023 15:21 by Roland B. Wassenberg 

This page was created on 28-Jan-2015 20:03 by Roland B. Wassenberg

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
26 03-Feb-2023 15:21 12 KB Roland B. Wassenberg to previous
25 26-Apr-2020 11:49 12 KB Roland B. Wassenberg to previous | to last
24 26-Apr-2020 10:53 12 KB Roland B. Wassenberg to previous | to last
23 26-Apr-2020 10:49 12 KB Roland B. Wassenberg to previous | to last
22 26-Apr-2020 10:47 12 KB Roland B. Wassenberg to previous | to last
21 26-Apr-2020 10:36 11 KB Roland B. Wassenberg to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 15 changed one line
* [BUG-65 Manual 1.pdf] ; size: 102 KB ; Mega-thanks to Erhard Pütz and Dieter Lichtenegger for giving us the best BUG/65 manual possible! :-)
* [BUG-65 Manual in html|bug65.zip] ; BUG/65 manual in html with css ; Mega-thanks to Erhard Pütz and Dieter Lichtenegger for giving us the best BUG/65 manual possible! :-)
* [BUG-65 Manual 1.pdf] ; size: 102 KB
At line 26 changed 69 lines
;**************************************************
; EQUATES INTO BUG/65:
;
LOADPOINT = ???? ; to be determined by user!!
LP = LOADPOINT ; just an abbreviation
MCBEND = LP+$021F ; BUG/65 END CODE MSB
DISPV = LP+$0209 ; DISPLAY CHAR
USRCMD = LP+$0220 ; USER COMMAND VECTOR
GET2HX = LP+$022C ; GET 2 HEX PARAMS
HEXL = $FC ; HEX PARAM 1 RESULT
HEX2 = $FE ; HEX PARAM 2 RESULT
ERRPAR = LP+$0235 ; REPORT PARAM ERROR
DHXBYT = LP+$0238 ; DISPLAY HEX BYTE
LSTPG0 = LP+$0240 ; LAST BUG/65 P0 BYTE USED
EOL = $9B ; END OF LINE CHAR
;
;**************************************************
*= USRCMD ; PATCH US INTO BUG/65
JMP USERC1
;
*= LP+$2000 ; RIGHT AFTER BUG/65 CODE
USERC1 CMP #'1 ; COMMAND "1" ?
BEQ CMDOK ; YES
RTS ; ELSE RTN EQUAL RESET - ERR
;
CMDOK JSR GET2HX ; GET START, END
LDA HEX1 ; MAKE SURE BOTH SPECIFIED
ORA HEX1+1
BEQ PARMER ; OR ELSE ERROR
LDA HEX2
ORA HEX2+1
BNE PARMOK
;
PARMER JMP ERRPAR ; REPORT PARAM ERROR
;
PARMOK LDX LSTPG0 ; LAST BUG/65 P0 BYTE
; (WE'LL USE THE NEXT
; FOR OUR ACCUMULATOR)
LDA #0 ; CLEAR ACCUMULATOR
STA 1,X
TAY ; INIT Y PTR INDEX
;
LOOP LDA HEX2+1 ; PAST END ADDRESS ?
CMP HEX1+1
BCC DONE ; YES
BNE NXTEOR ; NO
LDA HEX2
CMP HEX1
BCC DONE ; YES
;
NXTEOR LDA (HEX1),Y ; CALC EOR CHKSUM
EOR 1,X ; EOR WITH ACCUM
STA 1,X ; AND SAVE IN ACCUM
INC HEX1 ; BUMP PTR
BNE LOOP
INC HEX1+1
JMP LOOP
;
DONE LDA #EOL ; TO NEXT SCREEN LINE
JSR DISPV
LDX LSTPG0 ; RESTORE ACCUM ADDRESS
LDA 1,X ; DISPLAY HEX RESULT
JSR DHXBYT
LDA #0 ; RTN OK (EQUAL SET)
RTS
;
*= MCBEND ; CHANGE BUG/65 CODE
.BYTE >[*+$FF] ; END BYTE TO INCLUDE
.END ; THAT'S ALL FOLKS
0005 ;**************************************************
0010 ; EQUATES INTO BUG/65:
0015 ;
0020 loadpoint = ???? ; to be determined by user!!
0025 lp = loadpoint ; just an abbreviation
0030 MCBEND = lp+$21F ; BUG/65 END CODE MSB
0035 DISPV = lp+$209 ; DISPLAY CHAR
0040 USRCMD = lp+$220 ; USER COMMAND VECTOR
0045 GET2HX = lp+$22C ; GET 2 HEX PARAMS
0050 HEXl = $FC ; HEX PARAM 1 RESULT
0055 HEX2 = $FE ; HEX PARAM 2 RESULT
0060 ERRPAR = lp+$235 ; REPORT PARAM ERROR
0065 DHXBYT = lp+$238 ; DISPLAY HEX BYTE
0070 LSTPG0 = lp+$240 ; LAST BUG/65 P0 BYTE USED
0075 EOL = $9B ; END OF LINE CHAR
0080 ;
0090 ;**************************************************
0100 *= USRCMD ; PATCH US INTO BUG/65
0110 JMP USERC1
0120 ;
0130 *= lp+$2000 ; RIGHT AFTER BUG/65 CODE
0140 USERC1 CMP #'1 ; COMMAND "1" ?
0150 BEQ CMDOK ; YES
0160 RTS ; ELSE RTN EQUAL RESET - ERR
0170 ;
0180 CMDOK JSR GET2HX ; GET START, END
0190 LDA HEX1 ; MAKE SURE BOTH SPECIFIED
0200 ORA HEX1+1
0210 BEQ PARMER ; OR ELSE ERROR
0220 LDA HEX2
0230 ORA HEX2+1
0240 BNE PARMOK
0250 ;
0260 PARMER JMP ERRPAR ; REPORT PARAM ERROR
0270 ;
0280 PARMOK LDX LSTPG0 ; LAST BUG/65 P0 BYTE
0290 ; (WE'LL USE THE NEXT
0300 ; FOR OUR ACCUMULATOR)
0310 LDA #0 ; CLEAR ACCUMULATOR
0320 STA 1,X
0330 TAY ; INIT Y PTR INDEX
0340 ;
0350 LOOP LDA HEX2+1 ; PAST END ADDRESS ?
0360 CMP HEX1+1
0370 BCC DONE ; YES
0380 BNE NXTEOR ; NO
0390 LDA HEX2
0400 CMP HEX1
0410 BCC DONE ; YES
0420 ;
0430 NXTEOR LDA (HEX1),Y ; CALC EOR CHKSUM
0440 EOR 1,X ; EOR WITH ACCUM
0450 STA 1,X ; AND SAVE IN ACCUM
0460 INC HEX1 ; BUMP PTR
0470 BNE LOOP
0480 INC HEX1+1
0490 JMP LOOP
0500 ;
0510 DONE LDA #EOL ; TO NEXT SCREEN LINE
0520 JSR DISPV
0530 LDX LSTPG0 ; RESTORE ACCUM ADDRESS
0540 LDA 1,X ; DISPLAY HEX RESULT
0550 JSR DHXBYT
0560 LDA #0 ; RTN OK (EQUAL SET)
0570 RTS
0580 ;
0590 *= MCBEND ; CHANGE BUG/65 CODE
0600 .BYTE >[*+$FF] ; END BYTE TO INCLUDE
0610 .END ; THAT'S ALL FOLKS