I have used a routine that prints 42 characters per line in a BASIC program I've modified and I would like to find out who wrote it, if possible.
What I know so far is:
- It is saved as CODE 63234,456 (so there's probably an accompanying BASIC listing to generate it out there somewhere);
- It can print the 42-character text anywhere on the screen via:
LET z$=CHR$ 22+CHR$ r+CHR$ c+"text": RANDOMIZE USR 63234
This will print "text" at PRINT AT position r,c - if c is defined according to a screen with 42 columns in it. If I try this program:
10 PRINT AT 12,10;"X"
20 LET z$=CHR$ 22+CHR$ 13+CHR$ 10+"123456789012345678901234567890123456789012"
30 RANDOMIZE USR 63234
...the first 1 will not be printed directly below the X.
What I also know is that this not either of these routines:
- "THINCHARS" written by S.J. Patrick from the Aug-Sep 1984 issue of ZX Computing.
- "42 Characters" written by Paul Martin, from the October 1983 issue of Sinclair User.
I will attempt to disassemble the listing and see if anyone recognises the code, but that'll take me a while. I'm not going to use an automatic disassembler, as I need a bit of practice in how machine code works (as you know!) and this should provide it.
It could be that this routine was not written in t'old days. Circa the early 2000s I was also hanging around on the Yolkfolk.com forum and I know I have a couple of machine code routines and demos stashed away that were written by Tommy Pereira, who I don't think was ever active in the Spectrum community beyond writing Dizzy games and mods. It's possible this routine may have been his, but I have no way of knowing.
Anyway, on with the disassembly...
Identifying this PRINT42 routine
Identifying this PRINT42 routine
Last edited by TMD2003 on Tue Oct 13, 2020 12:16 pm, edited 1 time in total.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Re: Identifying this PRINT42 routine
Just over an hour, that took. Are you ready? Bear in mind my disassembly may be dodgy in places, but I'm now more confident it'll be better than what the Stimpo Disassembler will give me. I can even spot what's supposed to be a DEFW rather than an instruction...
Code: Select all
63234 42 93 92 ld hl,(23645)
63237 229 push hl
63238 33 93 247 ld hl,63325
63241 34 93 92 ld (23645),hl
63244 205 178 40 call 10418
63247 209 pop de
63248 237 83 93 92 ld (23645),de
63252 216 ret c
63253 35 inc hl
63254 78 ld c(hl)
63255 35 inc hl
63256 70 ld b,(hl)
63257 35 inc hl
63258 121 ld a,c
63259 176 or b
63260 200 ret z
63261 126 ld a,(hl)
63262 254 128 cp 128
63264 48 52 jr nc,52
63266 254 22 cp 22
63268 32 20 jr nz,20
63270 235 ex de,hl
63271 167 and a
63272 33 2 0 ld hl,2
63275 237 66 sbc hl,bc
63277 235 ex de,hl
63278 208 pop de
63279 35 inc hl
63280 86 ld d,(hl)
63281 11 dec bc
63282 35 inc hl
63283 94 ld e,(hl)
63284 11 dec bc
63285 205 33 248 call 63521
63288 24 11 jr 11
63290 254 13 cp 13
63292 32 13 jr nz,13
63294 237 91 48 248 ld de,(63536)
63298 205 38 248 call 63526
63301 237 83 48 248 ld (63536),de
63305 24 11 jr 11
63307 254 31 cp 31
63309 56 7 jr c,7
63311 229 push hl
63312 197 push bc
63313 205 95 247 call 63327
63316 193 pop bc
63317 225 pop hl
63318 35 inc hl
63319 11 dec bc
63320 120 ld a,b
63321 177 or c
63322 32 193 jr nz,193
63324 201 ret
63325 122 ld a,d } may be
63326 36 inc h } defw 9338
63327 217 exx called routine starts here
63328 229 push hl
63329 217 exx
63330 79 ld c,a
63331 38 0 ld h,0
63333 111 ld l,a
63334 17 26 248 ld de,63514
63337 25 add hl,de
63338 126 ld a,(hl)
63339 254 32 cp 32
63341 48 11 jr nc,11
63343 17 154 248 ld de,63642
63345 248 ret m
63346 111 ld l,a
63347 205 22 248 call 63510
63350 68 ld b,h
63351 77 ld c,l
63352 24 34 jr 34
63354 17 0 60 ld de,15360
63356 60 inc a
63357 105 ld l,c
63358 205 22 248 call 63510
63361 17 50 248 ld de,63538
63364 213 push de
63365 217 exx
63366 79 ld c,a
63367 47 cpl
63368 71 ld b,a
63369 217 exx
63370 6 8 ld b,8
63372 126 ld a,(hl)
63373 35 inc hl
63374 217 exx
63375 95 ld e,a
63376 161 and c
63377 87 ld d,a
63378 123 ld a,e
63379 23 rla
63380 160 and b
63381 178 or d
63382 217 exx
63383 18 ld (de),a
63384 19 inc de
63385 16 241 djnz 241 - probably djnz -15
63387 193 pop bc
63388 205 29 248 call 63517
63391 28 inc e
63392 237 83 48 248 ld (63536),de
63396 29 dec e
63397 123 ld a,e
63398 203 39 sla a
63400 111 ld l,a
63401 203 39 sla a
63403 133 add a,l
63404 111 ld l,a
63405 203 63 srl a
63407 203 63 srl a
63409 203 63 srl a
63411 95 ld e,a
63412 125 ld a,l
63413 230 7 and 7
63415 245 push af
63416 8 ex af,af'
63417 122 ld a,d
63418 203 47 sra a
63420 203 47 sra a
63422 203 47 sra a
63424 198 88 add a,88
63426 103 ld h,a
63427 122 ld a,d
63428 230 7 and 7
63430 15 rrca
63431 15 rrca
63432 15 rrca
63433 131 add a,e
63434 111 ld l,a
63435 58 141 92 ld a,(23693)
63438 95 ld e,a
63439 115 ld (hl),e
63440 35 inc hl
63441 241 pop af
63442 254 3 cp 3
63444 56 1 jr c,1
63446 115 ld (hl),e
63447 43 dec hl
63448 122 ld a,d
63449 230 248 and 248
63451 198 64 add a,64
63453 103 ld h,a
63454 229 push hl
63455 217 exx
63456 225 pop hl
63457 217 exx
63458 62 8 ld a,8
63460 245 push af
63461 10 ld a,(bc)
63462 217 exx
63463 229 push hl
63464 14 0 ld c,0
63466 17 255 3 ld de,1023
63469 8 ex af,af'
63470 167 and a
63471 40 14 jr z,14
63473 71 ld b,a
63474 8 ex af,af'
63475 167 and a
63476 31 rra
63477 203 25 rr c
63479 55 scf
63480 203 26 rr d
63482 203 27 rr e
63484 16 245 djnz 245 - probably djnz -11
63486 8 ex af,af'
63487 8 ex af,af'
63488 71 ld b,a
63489 126 ld a,(hl)
63490 162 and d
63491 176 or b
63492 119 ld (hl),a
63493 35 inc hl
63494 126 ld a,(hl)
63495 163 and e
63496 177 or c
63497 119 ld (hl),a
63498 225 pop hl
63499 36 inc h
63500 217 exx
63501 3 inc bc
63502 241 pop af
63503 61 dec a
63504 32 210 jr nz,210 - probably jr nz -46
63506 217 exx
63507 225 pop hl
63508 217 exx
63509 201 ret
63510 38 0 ld h,0 called routine starts here
63512 41 add hl,hl
63513 41 add hl,hl
63514 41 add hl,hl
63515 25 add hl,de
63516 201 ret
63517 237 91 48 248 ld de,(63536) called routine starts here
63521 123 ld a,e called routine starts here
63522 254 42 cp 42
63524 56 3 jr c,3
63526 20 inc d called routine starts here
63527 30 0 ld e,0
63529 122 ld a,d
63530 254 24 cp 24
63532 216 ret c
63533 22 0 ld d,0
63535 201 ret
63536 36 20 defw 5156
63538 0 probably character data from this point.
63539 64 Definitely not Z80 instructions…
63540 32 Routine uses some redefined
63541 32 characters to account for the narrower
63542 32 (6 pixel) character square width.
63543 32 Left this in in case it's needed.
63544 64
63545 0
63546 254
63547 254
63548 128
63549 224
63550 128
63551 0
63552 1
63553 128
63554 128
63555 128
63556 128
63557 128
63558 128
63559 128
63560 128
63561 128
63562 2
63563 128
63564 224
63565 224
63566 252
63567 224
63568 224
63569 192
63570 240
63571 240
63572 240
63573 240
63574 192
63575 240
63576 192
63577 192
63578 248
63579 240
63580 240
63581 240
63582 240
63583 240
63584 240
63585 240
63586 240
63587 128
63588 240
63589 192
63590 240
63591 240
63592 248
63593 240
63594 240
63595 248
63596 240
63597 240
63598 3
63599 240
63600 240
63601 240
63602 240
63603 4
63604 252
63605 224
63606 252
63607 240
63608 252
63609 240
63610 240
63611 255
63612 128
63613 255
63614 255
63615 255
63616 255
63617 255
63618 255
63619 255
63620 255
63621 255
63622 192
63623 255
63624 255
63625 255
63626 255
63627 255
63628 255
63629 255
63630 255
63631 255
63632 255
63633 255
63634 255
63635 255
63636 255
63637 128
63638 128
63639 255
63640 128
63641 5
63642 0
63643 0
63644 100
63645 104
63646 16
63647 44
63648 76
63649 0
63650 0
63651 32
63652 80
63653 32
63654 84
63655 72
63656 52
63657 0
63658 0
63659 56
63660 76
63661 84
63662 84
63663 100
63664 56
63665 0
63666 0
63667 126
63668 16
63669 16
63670 16
63671 16
63672 16
63673 0
63674 0
63675 68
63676 68
63677 40
63678 16
63679 16
63680 16
63681 0
63682 0
63683 120
63684 132
63685 180
63686 164
63687 180
63688 132
63689 120
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Re: Identifying this PRINT42 routine
The line at 63325 should be defb "z$" i think. Really interesting bit of code this, I am using a 42 char routine in a thing I am playing with. I always wondered how to pass BASIC variables to machine code too. Thanks for posting the disassembly.
Re: Identifying this PRINT42 routine
I've not yet got to the stage where I can get machine code to recognise variables - and it might be some way off.
How many of these PRINT42 routines are there already listed on ZXDB - i.e. how many am I going to have to sift through (minus two)?
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Re: Identifying this PRINT42 routine
I cannot tell you how many PRINT 42 routines are in the ZXDB, but I can add another routine to look at. The SpectraNet ethernet interface ROM contains such a routine :
https://github.com/spectrumero/spectran ... output.asm
I have simplified the code a little for my own project. I removed UTF-8 extended character support and also screen scrolling :
[edit] I realise that this response does not in any way answer the OP's question....
https://github.com/spectrumero/spectran ... output.asm
I have simplified the code a little for my own project. I removed UTF-8 extended character support and also screen scrolling :
Code: Select all
;The MIT License
;
;Copyright (c) 2008 Dylan Smith
;
;Permission is hereby granted, free of charge, to any person obtaining a copy
;of this software and associated documentation files (the "Software"), to deal
;in the Software without restriction, including without limitation the rights
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;copies of the Software, and to permit persons to whom the Software is
;furnished to do so, subject to the following conditions:
;
;The above copyright notice and this permission notice shall be included in
;all copies or substantial portions of the Software.
;
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
;THE SOFTWARE.
;;; Modified PRINT 42 routine by MonkZy (All I did was removed/renamed some labels and removed the UTF-8 compliance and screen scrolling, most comments are from original code)
; Print characters 42 columns per line.
; A=ASCII code of char to print, x and y coordinates are stored in labelled locations ev_column and ev_row
Print_5x8
push hl
push bc
push de
; find the address of the character in the bitmap table
sub 32 ; space = offset 0
ld l, a
ld h, 0
; multiply by 8 to get the byte offset
add hl, hl
add hl, hl
add hl, hl
; add the offset
ld bc, CHARSET
add hl, bc
; Now find the address in the frame buffer to be written.
ex de, hl
ld hl, col_lookup
ld a, (ev_column)
ld b, a
add a, l
ld l, a ; hl = pointer to byte in lookup table
ld a, (hl) ; a = lookup table value
ld hl, (ev_row) ; hl = framebuffer pointer for start of row
add a,l
ld l, a ; hl = frame buffer address
; de contains the address of the char bitmap
; hl contains address in the frame buffer
paintchar
ld a, b ; retrieve column
and 3 ; find out how much we need to rotate
jr z, norotate ; no need to rotate, character starts at MSB
rla ; multipy by 2
ld (ev_pr_wkspc), a ; save A
ld b, 8 ; byte copy count for outer loop
fbwriterotated
push bc ; save outer loop count
ld a, (ev_pr_wkspc)
ld b, a ; set up rotate loop count
ld a, (de) ; get character bitmap
ld c, a ; C contains rightmost fragment of bitmap
xor a ; set a=0 to accept lefmost fragment of bitmap
rotloop
rl c
rla ; suck out leftmost bit from the carry flag
djnz rotloop
writerotated
or (hl) ; merge with existing character
ld (hl), a
ld a, c
cp 0
jr z, writerotated_skip ; nothing to do
inc l ; next char cell
or (hl)
ld (hl), a
dec l ; restore l
writerotated_skip
inc h ; next line
inc de ; next line of character bitmap
pop bc ; retrieve outer loop count
djnz fbwriterotated
leave
pop de
pop bc
pop hl
ret
norotate
ld b, 8
norotate_loop
ld a, (de) ; move bitmap into the frame buffer
ld (hl), a
inc de ; next line of bitmap
inc h ; next line of frame buffer
djnz norotate_loop
jr leave
ev_column
defb 0
ev_row
defb 0,0
ev_pr_wkspc
defb 0
col_lookup
defb 0,0,1,2,3,3,4,5,6,6,7,8,9,9,10,11,12,12,13,14,15,15
defb 16,17,18,18,19,20,21,21,22,23,24,24,25,26,27,27,28,29,30,30,31
CHARSET
;; char_space
defb 0
defb 0
defb 0
defb 0
defb 0
defb 0
defb 0
defb 0
;; char_pling
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb 0
defb %00100000
defb 0
;; char_quote
defb %01010000
defb %01010000
defb 0
defb 0
defb 0
defb 0
defb 0
defb 0
;; char_octothorpe
defb 0
defb %01010000
defb %11111000
defb %01010000
defb %01010000
defb %11111000
defb %01010000
defb 0
;; char_buck
defb %00100000
defb %11111000
defb %10100000
defb %11111000
defb %00101000
defb %11111000
defb %00100000
defb 0
;; char_percent
defb %11001000
defb %11001000
defb %00010000
defb %00100000
defb %01000000
defb %10011000
defb %10011000
defb 0
;; char_ampersand
defb %01110000
defb %10001000
defb %01010000
defb %00100000
defb %01010000
defb %10001000
defb %01110100
defb 0
;; char_singlequote
defb %00010000
defb %00100000
defb %01000000
defb 0
defb 0
defb 0
defb 0
defb 0
;; char_obrace
defb %00100000
defb %01000000
defb %10000000
defb %10000000
defb %10000000
defb %01000000
defb %00100000
defb 0
;; char_cbrace
defb %00100000
defb %00010000
defb %00001000
defb %00001000
defb %00001000
defb %00010000
defb %00100000
defb 0
;; char_asterisk
defb 0
defb %01010000
defb %00100000
defb %11111000
defb %00100000
defb %01010000
defb 0
defb 0
;; char_plus
defb 0
defb %00100000
defb %00100000
defb %11111000
defb %00100000
defb %00100000
defb 0
defb 0
;; char_comma
defb 0
defb 0
defb 0
defb 0
defb 0
defb %00100000
defb %00100000
defb %01000000
;; char_minus
defb 0
defb 0
defb 0
defb %11111000
defb 0
defb 0
defb 0
defb 0
;; char_period
defb 0
defb 0
defb 0
defb 0
defb 0
defb %00110000
defb %00110000
defb 0
;; char_slash
defb %00001000
defb %00001000
defb %00010000
defb %00100000
defb %01000000
defb %10000000
defb %10000000
defb 0
;; char_zero
defb %01110000
defb %10001000
defb %10011000
defb %10101000
defb %11001000
defb %10001000
defb %01110000
defb 0
;; char_one
defb %00100000
defb %01100000
defb %10100000
defb %00100000
defb %00100000
defb %00100000
defb %11111000
defb 0
;; char_two
defb %01110000
defb %10001000
defb %00001000
defb %00110000
defb %01000000
defb %10000000
defb %11111000
defb 0
;; char_three
defb %01110000
defb %10001000
defb %00001000
defb %00110000
defb %00001000
defb %10001000
defb %01110000
defb 0
;; char_four
defb %00010000
defb %00110000
defb %01010000
defb %10010000
defb %11111000
defb %00010000
defb %00010000
defb 0
;; char_five
defb %11111000
defb %10000000
defb %11110000
defb %00001000
defb %00001000
defb %10001000
defb %01110000
defb 0
;; char_six
defb %00111000
defb %01000000
defb %10000000
defb %11110000
defb %10001000
defb %10001000
defb %01110000
defb 0
;; char_seven
defb %11111000
defb %00001000
defb %00001000
defb %00010000
defb %00010000
defb %00100000
defb %00100000
defb 0
;; char_eight
defb %01110000
defb %10001000
defb %10001000
defb %01110000
defb %10001000
defb %10001000
defb %01110000
defb 0
;; char_nine
defb %01110000
defb %10001000
defb %10001000
defb %01111000
defb %00001000
defb %00001000
defb %01110000
defb 0
;; char_colon
defb 0
defb %00100000
defb 0
defb 0
defb 0
defb %00100000
defb 0
defb 0
;; char_semicolon
defb 0
defb %00100000
defb 0
defb 0
defb %00100000
defb %00100000
defb %01000000
defb 0
;; char_lessthan
defb %00010000
defb %00100000
defb %01000000
defb %10000000
defb %01000000
defb %00100000
defb %00010000
defb 0
;; char_equals
defb 0
defb 0
defb %11110000
defb 0
defb %11110000
defb 0
defb 0
defb 0
;; char_gtthan
defb %10000000
defb %01000000
defb %00100000
defb %00010000
defb %00100000
defb %01000000
defb %10000000
defb 0
;; char_quest
defb %01110000
defb %10001000
defb %00001000
defb %00110000
defb %00100000
defb 0
defb %00100000
defb 0
;; char_at
defb %01110000
defb %10001000
defb %10111000
defb %10101000
defb %10010000
defb %10000000
defb %01111000
defb 0
;; char_A
defb %00100000
defb %01010000
defb %10001000
defb %11111000
defb %10001000
defb %10001000
defb %10001000
defb 0
;; char_B
defb %11110000
defb %10001000
defb %10001000
defb %11110000
defb %10001000
defb %10001000
defb %11110000
defb 0
;; char_C
defb %01110000
defb %10001000
defb %10000000
defb %10000000
defb %10000000
defb %10001000
defb %01110000
defb 0
;; char_D
defb %11100000
defb %10010000
defb %10001000
defb %10001000
defb %10001000
defb %10010000
defb %11100000
defb 0
;; char_E
defb %11111000
defb %10000000
defb %10000000
defb %11110000
defb %10000000
defb %10000000
defb %11111000
defb 0
;; char_F
defb %11111000
defb %10000000
defb %10000000
defb %11110000
defb %10000000
defb %10000000
defb %10000000
defb 0
;; char_G
defb %01110000
defb %10001000
defb %10000000
defb %10000000
defb %10011000
defb %10001000
defb %01110000
defb 0
;; char_H
defb %10001000
defb %10001000
defb %10001000
defb %11111000
defb %10001000
defb %10001000
defb %10001000
defb 0
;; char_I
defb %01110000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %01110000
defb 0
;; char_J
defb %00001000
defb %00001000
defb %00001000
defb %00001000
defb %00001000
defb %10001000
defb %01110000
defb 0
;; char_K
defb %10001000
defb %10010000
defb %10100000
defb %11000000
defb %10100000
defb %10010000
defb %10001000
defb 0
;; char_L
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %11111000
defb 0
;; char_M
defb %10001000
defb %11011000
defb %10101000
defb %10101000
defb %10001000
defb %10001000
defb %10001000
defb 0
;; char_N
defb %10001000
defb %10001000
defb %11001000
defb %10101000
defb %10011000
defb %10001000
defb %10001000
defb 0
;; char_O
defb %01110000
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb %01110000
defb 0
;; char_P
defb %11110000
defb %10001000
defb %10001000
defb %11110000
defb %10000000
defb %10000000
defb %10000000
defb 0
;; char_Q
defb %01110000
defb %10001000
defb %10001000
defb %10001000
defb %10101000
defb %10010000
defb %01101000
defb 0
;; char_R
defb %11110000
defb %10001000
defb %10001000
defb %11110000
defb %10010000
defb %10001000
defb %10001000
defb 0
;; char_S
defb %01110000
defb %10001000
defb %10000000
defb %01110000
defb %00001000
defb %10001000
defb %01110000
defb 0
;; char_T
defb %11111000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb 0
;; char_U
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb %01110000
defb 0
;; char_V
defb %10001000
defb %10001000
defb %10001000
defb %01010000
defb %01010000
defb %00100000
defb %00100000
defb 0
;; char_W
defb %10001000
defb %10001000
defb %10101000
defb %10101000
defb %10101000
defb %11011000
defb %10001000
defb 0
;; char_X
defb %10001000
defb %10001000
defb %01010000
defb %00100000
defb %01010000
defb %10001000
defb %10001000
defb 0
;; char_Y
defb %10001000
defb %10001000
defb %01010000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb 0
;; char_Z
defb %11111000
defb %00001000
defb %00010000
defb %00100000
defb %01000000
defb %10000000
defb %11111000
defb 0
;; char_osqb
defb %01110000
defb %01000000
defb %01000000
defb %01000000
defb %01000000
defb %01000000
defb %01110000
defb 0
;; char_backslash
defb %10000000
defb %10000000
defb %01000000
defb %00100000
defb %00010000
defb %00001000
defb %00001000
defb 0
;; char_csqb
defb %01110000
defb %00010000
defb %00010000
defb %00010000
defb %00010000
defb %00010000
defb %01110000
defb 0
;; char_power
defb %00100000
defb %01010000
defb %10001000
defb 0
defb 0
defb 0
defb 0
defb 0
;; char_underscore
defb 0
defb 0
defb 0
defb 0
defb 0
defb 0
defb %11111100
defb 0
;; char_quid
defb %00110000
defb %01001000
defb %01000000
defb %11110000
defb %01000000
defb %01000000
defb %11111000
defb 0
;; char_a
defb 0
defb 0
defb %01110000
defb %00001000
defb %01111000
defb %10001000
defb %01111000
defb 0
;; char_b
defb %10000000
defb %10000000
defb %11110000
defb %10001000
defb %10001000
defb %10001000
defb %11110000
defb 0
;; char_c
defb 0
defb 0
defb %01111000
defb %10000000
defb %10000000
defb %10000000
defb %01111000
defb 0
;; char_d
defb %00001000
defb %00001000
defb %01111000
defb %10001000
defb %10001000
defb %10001000
defb %01111000
defb 0
;; char_e
defb 0
defb 0
defb %01110000
defb %10001000
defb %11110000
defb %10000000
defb %01111000
defb 0
;; char_f
defb 0
defb %01110000
defb %10000000
defb %11100000
defb %10000000
defb %10000000
defb %10000000
defb 0
;; char_g
defb 0
defb 0
defb %01111000
defb %10001000
defb %10001000
defb %01111000
defb %00001000
defb %01110000
;; char_h
defb %10000000
defb %10000000
defb %11110000
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb 0
;; char_i
defb %00100000
defb 0
defb %01100000
defb %00100000
defb %00100000
defb %00100000
defb %01110000
defb 0
;; char_j
defb %00100000
defb 0
defb %01100000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %11000000
;; char_k
defb 0
defb %10000000
defb %10010000
defb %10100000
defb %11000000
defb %10100000
defb %10010000
defb 0
;; char_l
defb %01100000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %00100000
defb %01110000
defb 0
;; char_m
defb 0
defb 0
defb %11010000
defb %10101000
defb %10101000
defb %10101000
defb %10001000
defb 0
;; char_n
defb 0
defb 0
defb %11110000
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb 0
;; char_o
defb 0
defb 0
defb %01110000
defb %10001000
defb %10001000
defb %10001000
defb %01110000
defb 0
;; char_p
defb 0
defb 0
defb %11110000
defb %10001000
defb %10001000
defb %11110000
defb %10000000
defb %10000000
;; char_q
defb 0
defb 0
defb %01111000
defb %10001000
defb %10001000
defb %01111000
defb %00001000
defb %00001100
;; char_r
defb 0
defb 0
defb %01110000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb 0
;; char_s
defb 0
defb 0
defb %01111000
defb %10000000
defb %01110000
defb %00001000
defb %11110000
defb 0
;; char_t
defb %01000000
defb %01000000
defb %11110000
defb %01000000
defb %01000000
defb %01000000
defb %00111000
defb 0
;; char_u
defb 0
defb 0
defb %10001000
defb %10001000
defb %10001000
defb %10001000
defb %01110000
defb 0
;; char_v
defb 0
defb 0
defb %10001000
defb %10001000
defb %01010000
defb %01010000
defb %00100000
defb 0
;; char_w
defb 0
defb 0
defb %10101000
defb %10101000
defb %10101000
defb %10101000
defb %01010000
defb 0
;; char_x
defb 0
defb 0
defb %10001000
defb %01010000
defb %00100000
defb %01010000
defb %10001000
defb 0
;; char_y
defb 0
defb 0
defb %10001000
defb %10001000
defb %01111000
defb %00001000
defb %01110000
defb 0
;; char_z
defb 0
defb 0
defb %11111000
defb %00010000
defb %00100000
defb %01000000
defb %11111000
defb 0
;; char_ocbk
defb %00111000
defb %01000000
defb %01000000
defb %10000000
defb %01000000
defb %01000000
defb %00111000
defb 0
;; char_ccbk
defb %11100000
defb %00010000
defb %00010000
defb %00001000
defb %00010000
defb %00010000
defb %11100000
defb 0
;; char_tilde
defb %01010000
defb %10100000
defb 0
defb 0
defb 0
defb 0
defb 0
defb 0
;; char_copy
defb %01110000
defb %10001000
defb %11101000
defb %11001000
defb %11101000
defb %10001000
defb %01110000
defb 0
;; char_block
defb 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
Last edited by MonkZy on Wed Oct 14, 2020 1:44 am, edited 1 time in total.
- Einar Saukas
- Bugaboo
- Posts: 3138
- Joined: Wed Nov 15, 2017 2:48 pm
Re: Identifying this PRINT42 routine
Well mown! You've earned yourself... actually, you're probably sick of the sight of corned beef in Brazil. You've earned yourself a bowl of my home-made mushroom soup! Not that I've made it yet, but I will.Einar Saukas wrote: ↑Wed Oct 14, 2020 1:32 am https://spectrumcomputing.co.uk/entry/2 ... pectrum/42
How'd you do it, then? I don't think I've ever seen the original tape, just the routine. But I have just noticed Jim Grimwood's notes amongst the instructions, so I must have found it on the Type Fantastic at some stage in distant history. Better still, with the explanation of what the lines do, and what the redefined characters are, I could (I suppose) use this routine with a custom character set, seeing as I've made one that's narrower than usual.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!