This was one of the first things I used when I started Pascal programming in 92. I made the higher ASCII symbols into parts of letters and punctuation for big block letters and an API to draw something like Star Trek LCARS displays.. lol. Also it was nice to finally just clean up those built in VGA fonts.
@damouzeАй бұрын
That is a very nice bit of programming. I remember redefining the character set for a visualization I wrote for an (example) screamtracker module player for the Sound Blaster written in Pascal, so that I could do both horizontal and vertical VU bars with the granularity of a single pixel. Of course, in a way the ega/vga text modes could be seen (and used) as tile based graphics, which is an interesting topic in and of itself.
@root42Ай бұрын
Zeux at al used this for their games.
@bitl7dumpАй бұрын
Text-mode hacks is always cool ;)
@maxmuster7003Ай бұрын
There is function AX=1100 and another AX=1110 and both do near the same. And there is function AX=1103 to activate 2 blocks of character at once with a combination value using the same ASCII numbers. If we use 2 character sets at once(up to 512 character) the bit 3 of the Attribut bit on the screen specify which character block is shown, but we loose the intense bit of the foreground color and the colors are reduced to 0-7 foreground colors for one of two sets. (We can get the palette value of an intense color example color f and then we can override the palette of color 7, but then we loose the darker color.) We starts with block 0 with all character inside. Other blocks are empty. Now can use function AX=1100 for user character in block 0 and additional some user character for block 1. For block 0 + block 1 we can use value 84 = all character of block 0 + 1 are visible now, if we set bit 3 and for the other set clear bit 3 of the attribute byte. For block 2 + block 3 we can use value 8E = the character from block 2 + 3 are visible now, character from block 0 are not aviable. But we can copy the full set from block 0 into our new blocks if we want. I don’t know why we have to use the highest bit 7 for combine the blocks and i don’t know how to use block 4, 5, 6, 7.
@גוגל.קוםАй бұрын
nice, i think i gazed straight into hell, or maybe into the mind of the cpu
@maxmuster7003Ай бұрын
Tiny Pacman animation for the command prompt using DOS debug. The routine draw 3 ASCII 8 times and then it restart with the first 3 character plus one location to the right side. The body starts inside of two character and each step it moves one pixel to the right side into a third character while open and close the mouth. The internal debug commands are used to build two executable. The second executable have the animate routine only without to set the user character again. On DosBox the "cls" command reset all character to default. -a 072D:0100 mov ax,1110 function user font 072D:0103 mov bp,170 offset (com file segments: ds=cs=ss) 072D:0106 mov cx,18 24 character 072D:0109 mov dx,80 extended ASCII 072D:010C xor bl,bl character of block 0 072D:010E mov bh,10 16 bytes 072D:0110 int 10 072D:0112 mov ah,3 get cursor position 072D:0114 xor bh,bh 072D:0116 int 10 072D:0118 mov bl,dh 072D:011A xor dh,dh 072D:011C mov bp,bx 072D:011E shl bx,7 072D:0121 shl dx,1 072D:0123 shl bp,5 072D:0126 add bx,dx 072D:0128 add bp,bx 072D:012A mov ax,b800 072D:012D mov es,ax 072D:012F cld 072D:0130 mov ah,e color 072D:0132 mov ch,10 distance 072D:0134 mov di,bp 072D:0136 mov al,80 extended ASCII 072D:0138 mov cl,8 072D:013A stosw 072D:013B inc al 072D:013D stosw 072D:013E inc al 072D:0140 stosw 072D:0141 inc al 072D:0143 sub di,6 072D:0146 mov bl,al 072D:0148 mov dx,3DA status port vsync 072D:014B mov si,d000 delay 072D:014E in al,dx 072D:014F test al,8 072D:0151 jnz 014E 072D:0153 dec si 072D:0154 jnz 014E 072D:0156 mov al,bl 072D:0158 dec cl 072D:015A jnz 013A 072D:015C mov byte ptr es:[bp],20 clear left position 072D:0161 add bp,2 072D:0164 dec ch 072D:0166 jnz 0134 072D:0168 ret 072D:0169 org 0170 072D:0170 DB 0,3,7,1e,3e,3f,7f,ff,ff,7f,3f,3f,1f,7,3,0 072D:0180 DB 0,c0,e0,78,60,c0,80,0,0,80,c0,e0,f8,e0,c0,0 072D:0190 DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 072D:01A0 DB 0,1,3,f,1f,1f,3f,7f,7f,3f,1f,1f,f,3,1,0 072D:01B0 DB 0,e0,f0,38,3c,f8,f0,c0,c0,f0,f8,fc,fc,f0,e0,0 072D:01C0 DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 072D:01D0 DB 0,0,1,7,f,f,1f,3f,3f,1f,f,f,7,1,0,0 072D:01E0 DB 0,f0,f8,9e,9f,ff,fc,e0,e0,fc,ff,fe,fc,f8,f0,0 072D:01F0 DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 072D:0200 DB 0,0,0,3,7,7,f,1f,1f,f,7,7,3,0,0,0 072D:0210 DB 0,78,fc,cf,cf,ff,ff,fe,fe,ff,ff,ff,ff,fc,78,0 072D:0220 DB 0,0,0,0,80,80,c0,0,0,c0,80,0,0,0,0,0 072D:0230 DB 0,0,0,1,3,3,7,f,f,7,3,3,1,0,0,0 072D:0240 DB 0,3c,7e,e7,e7,ff,ff,ff,ff,ff,ff,ff,ff,7e,3c,0 072D:0250 DB 0,0,0,80,c0,c0,e0,f0,f0,e0,c0,80,80,0,0,0 072D:0260 DB 0,0,0,0,1,1,3,7,7,3,1,1,0,0,0,0 072D:0270 DB 0,1e,3f,f3,f3,ff,ff,fc,fc,ff,ff,ff,ff,3f,1e,0 072D:0280 DB 0,0,0,c0,e0,e0,80,0,0,80,e0,c0,80,0,0,0 072D:0290 DB 0,0,0,0,0,0,1,3,3,1,0,0,0,0,0,0 072D:02A0 DB 0,f,1f,e9,f9,ff,ff,fe,fe,ff,ff,ff,7f,1f,f,0 072D:02B0 DB 0,0,80,e0,f0,c0,80,0,0,0,e0,e0,c0,80,0,0 072D:02C0 DB 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0 072D:02D0 DB 0,7,f,3c,7c,7f,ff,ff,ff,ff,7f,7f,3f,f,7,0 072D:02E0 DB 0,80,c0,e0,f0,e0,c0,0,0,c0,e0,f0,f0,c0,80,0 072D:02F0 -n PACMAN.COM -rcx CX 0000 :1F0 -wcs:100 Writing 01F0 bytes -n PAC.COM -rcx CX 01F0 :57 -wcs:112 Writing 0057 bytes -q
@TreeOfWisdom2Ай бұрын
Isn't M_PI already defined in math.h?
@root42Ай бұрын
Hence the ifdef. In TurboC not needed of course. The base of the program is from very early episodes
@TreeOfWisdom2Ай бұрын
@@root42 The code looks very TurboC specific, that's why I commented. I don't think it could easily be made to work with DJGPP and it defines M_PI anyway.
@maxmuster7003Ай бұрын
Sorce code: Page not found.
@root42Ай бұрын
Fixed it! Repository was still on private.
@j.tann1970Ай бұрын
You have horizontal and vertical mixed up! When you showed c1 you called them horizontal bars, they are vertical. And c3 is not vertical but horizontal bars.