home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_26_1988_Transactor_Publishing.d64
/
box.pal
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
73 lines
100 sys 700 ;pal 64
110 .opt oo
120 ; "box"
130 ; draws a box given left edge,
140 ; top edge, width and height
150 ; in "xd", "yd", "lx", "hi".
160 ; character in "boxchr".
170 ;
180 box =*
190 lda #"[147]"
200 jsr $ffd2 ;optional clear
210 box1l =*
220 ldx yd
230 ldy xd
240 clc
250 jsr $fff0 ;position cursor
260 ldx #0
270 box3l =*
280 lda boxchr
290 jsr $ffd2 ;print char
300 inx
310 cpx lx
320 bne box3l
330 ldx #1
340 box4l =*
350 lda #"[157]"
360 jsr $ffd2
370 lda #""
380 jsr $ffd2
390 lda boxchr
400 jsr $ffd2
410 inx
420 cpx hi
430 bne box4l
440 ldx #1
450 box5l =*
460 lda #"[157]"
470 jsr $ffd2
480 inx
490 cpx lx
500 bne box5l
510 ldx #1
520 box6l =*
530 lda #"[145]"
540 jsr $ffd2
550 inx
560 cpx hi
570 bne box6l
580 ldx #1
590 box7l =*
600 lda #"[157]"
610 jsr $ffd2
620 lda #""
630 jsr $ffd2
640 lda boxchr
650 jsr $ffd2
660 inx
670 cpx hi
680 bne box7l
690 ldx #1
700 box8l =*
710 lda boxchr
720 jsr $ffd2
730 inx
740 cpx lx
750 bne box8l
760 rts
770 lx .byte 15 ;width
790 hi .byte 10 ;height
800 xd .byte 0 ;distance x from side
810 yd .byte 0 ;distance y from top
820 boxchr .asc "*";char used