home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progasm / newchars.arj / NEWCHARS.ASM
Encoding:
Assembly Source File  |  1991-08-11  |  3.5 KB  |  117 lines

  1. (276)   Fri 9 Aug 91  1:38p     Rcvd: Sun 11 Aug  1:53a
  2. By: Mike Dodd
  3. To: Erik Vanriper, 1:107/230@fidonet.org
  4. Re: Re: EASE-C READER
  5. St: Rcvd
  6. ------------------------------------------------------------------------------
  7. @EID:9b32 17096cc0
  8.  
  9.  >>  I've reprogrammed the (), [], and {} characters on my PC's VGA display
  10.  >>  to be taller than normal.
  11.  
  12.  > I am interested, and would you mind if I sent it through the PDN? Sounds
  13.  > like something that is very useful.
  14.  > Also, is this kind of stuff workable on EGA cards as well?
  15.  
  16.  Here's the code.  It should work on EGA because the characters use an 8x14
  17.  font.  I've put the program in the public domain, so you can send it
  18.  through PDN.  Hope it helps.
  19.  
  20.  ------ SNIP  SNIP  SNIP -------
  21.  
  22.  ; Ease-C-Read.
  23.  ; Program to make [], (), and {} characters taller on EGA/VGA screen.
  24.  ; Public domain by Mike Dodd.  August 9, 1991.
  25.  ; Assemble with MASM 5.xx.  Link for small model.  Make .com with EXE2BIN.
  26.  
  27.  .MODEL TINY
  28.  .CODE
  29.  
  30.  VERY_TALL   equ  1    ; 0 makes shorter characters
  31.  BYTES_CHAR  equ  14   ; Number of bytes per character
  32.  
  33.  ; This macro loads BP with the offset of the new data, DX with the
  34.  ; character to change, and calls INT 10h to store the bit map.
  35.  
  36.  FIX macro pointer, character
  37.    mov bp, pointer
  38.    mov dx, character
  39.    int 10h
  40.  endm
  41.  
  42.  org     100h
  43.  
  44.  newchars PROC near
  45.  
  46.  ; These registers remain the same through the Int 10h calls, so we
  47.  ; don't have to reinitialize them for each character.
  48.  
  49.  push    cs
  50.  pop     es                  ; ES = data table segment
  51.  mov     cx, 1               ; CX = character count
  52.  mov     bx, BYTES_CHAR SHL 8; BH = bytes/character, BL = 0
  53.  mov     ax, 1100h           ; INT 10h, function 11, subfunction 0
  54.  
  55.  FIX left_bracket, '['
  56.  FIX right_bracket, ']'
  57.  FIX left_paren, '('
  58.  FIX right_paren, ')'
  59.  FIX left_brace, '{'
  60.  FIX right_brace, '}'
  61.  
  62.  int     20h                 ; Terminate the program
  63.  
  64.  newchars  ENDP
  65.  
  66.  ; Data for the new characters.  Each character contains 14 bytes.
  67.  ; Two versions are given -- tall and very tall.
  68.  
  69.  left_bracket:   ; Left square bracket: [
  70.  if VERY_TALL
  71.  db 1eh, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 1eh
  72.  else
  73.  db 0, 1eh, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 1eh, 0
  74.  endif
  75.  
  76.  right_bracket:  ; Right square bracket: ]
  77.  if VERY_TALL
  78.  db 78h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 78h
  79.  else
  80.  db 0, 78h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 78h, 0
  81.  endif
  82.  
  83.  left_paren:     ; Left parentheses: (
  84.  if VERY_TALL
  85.  db 06h, 0ch, 18h, 30h, 30h, 30h, 30h, 30h, 30h, 30h, 30h, 18h, 0ch, 06h
  86.  else
  87.  db 0, 06h, 0ch, 18h, 30h, 30h, 30h, 30h, 30h, 30h, 18h, 0ch, 06h, 0
  88.  endif
  89.  
  90.  right_paren:    ; Right parentheses: )
  91.  if VERY_TALL
  92.  db 60h, 30h, 18h, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 18h, 30h, 60h
  93.  else
  94.  db 0, 60h, 30h, 18h, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 18h, 30h, 60h, 0
  95.  endif
  96.  
  97.  left_brace:     ; Left curly brace: {
  98.  if VERY_TALL
  99.  db 0eh, 18h, 18h, 18h, 18h, 18h, 70h, 18h, 18h, 18h, 18h, 18h, 18h, 0eh
  100.  else
  101.  db 0, 0eh, 18h, 18h, 18h, 18h, 70h, 18h, 18h, 18h, 18h, 18h, 0eh, 0
  102.  endif
  103.  
  104.  right_brace:    ; Right curly brace: }
  105.  if VERY_TALL
  106.  db 70h, 18h, 18h, 18h, 18h, 18h, 0eh, 18h, 18h, 18h, 18h, 18h, 18h, 70h
  107.  else
  108.  db 0, 70h, 18h, 18h, 18h, 18h, 0eh, 18h, 18h, 18h, 18h, 18h, 70h, 0
  109.  endif
  110.  
  111.  END newchars
  112.  
  113.  ------ SNIP  SNIP  SNIP -------
  114. --- TBBS v2.1/NM
  115. @PATH: 151/102 103 1003 13/13
  116.  * Origin: Micro Message Service NCRTP (919)779-6674 TBBS 2.1M  (1:151/102)
  117.