home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / library / keyboard / newchar.asm
Assembly Source File  |  1992-05-27  |  3KB  |  92 lines

  1.  ; Ease-C-Read.
  2.  ; Program to make [], (), and {} characters taller on EGA/VGA screen.
  3.  ; Public domain by Mike Dodd.  August 9, 1991.
  4.  ; Assemble with MASM 5.xx.  Link for small model.  Make .com with EXE2BIN.
  5.  
  6.  .MODEL TINY
  7.  .CODE
  8.  
  9.  VERY_TALL   equ  1    ; 0 makes shorter characters
  10.  BYTES_CHAR  equ  14   ; Number of bytes per character
  11.  
  12.  ; This macro loads BP with the offset of the new data, DX with the
  13.  ; character to change, and calls INT 10h to store the bit map.
  14.  
  15.  FIX macro pointer, character
  16.    mov bp, pointer
  17.    mov dx, character
  18.    int 10h
  19.  endm
  20.  
  21.  org     100h
  22.  
  23.  newchars PROC near
  24.  
  25.  ; These registers remain the same through the Int 10h calls, so we
  26.  ; don't have to reinitialize them for each character.
  27.  
  28.  push    cs
  29.  pop     es                  ; ES = data table segment
  30.  mov     cx, 1               ; CX = character count
  31.  mov     bx, BYTES_CHAR SHL 8; BH = bytes/character, BL = 0
  32.  mov     ax, 1100h           ; INT 10h, function 11, subfunction 0
  33.  
  34.  FIX left_bracket, '['
  35.  FIX right_bracket, ']'
  36.  FIX left_paren, '('
  37.  FIX right_paren, ')'
  38.  FIX left_brace, '{'
  39.  FIX right_brace, '}'
  40.  
  41.  int     20h                 ; Terminate the program
  42.  
  43.  newchars  ENDP
  44.  
  45.  ; Data for the new characters.  Each character contains 14 bytes.
  46.  ; Two versions are given -- tall and very tall.
  47.  
  48.  left_bracket:   ; Left square bracket: [
  49.  if VERY_TALL
  50.  db 1eh, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 1eh
  51.  else
  52.  db 0, 1eh, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 1eh, 0
  53.  endif
  54.  
  55.  right_bracket:  ; Right square bracket: ]
  56.  if VERY_TALL
  57.  db 78h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 78h
  58.  else
  59.  db 0, 78h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 18h, 78h, 0
  60.  endif
  61.  
  62.  left_paren:     ; Left parentheses: (
  63.  if VERY_TALL
  64.  db 06h, 0ch, 18h, 30h, 30h, 30h, 30h, 30h, 30h, 30h, 30h, 18h, 0ch, 06h
  65.  else
  66.  db 0, 06h, 0ch, 18h, 30h, 30h, 30h, 30h, 30h, 30h, 18h, 0ch, 06h, 0
  67.  endif
  68.  
  69.  right_paren:    ; Right parentheses: )
  70.  if VERY_TALL
  71.  db 60h, 30h, 18h, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 18h, 30h, 60h
  72.  else
  73.  db 0, 60h, 30h, 18h, 0ch, 0ch, 0ch, 0ch, 0ch, 0ch, 18h, 30h, 60h, 0
  74.  endif
  75.  
  76.  left_brace:     ; Left curly brace: {
  77.  if VERY_TALL
  78.  db 0eh, 18h, 18h, 18h, 18h, 18h, 70h, 18h, 18h, 18h, 18h, 18h, 18h, 0eh
  79.  else
  80.  db 0, 0eh, 18h, 18h, 18h, 18h, 70h, 18h, 18h, 18h, 18h, 18h, 0eh, 0
  81.  endif
  82.  
  83.  right_brace:    ; Right curly brace: }
  84.  if VERY_TALL
  85.  db 70h, 18h, 18h, 18h, 18h, 18h, 0eh, 18h, 18h, 18h, 18h, 18h, 18h, 70h
  86.  else
  87.  db 0, 70h, 18h, 18h, 18h, 18h, 0eh, 18h, 18h, 18h, 18h, 18h, 70h, 0
  88.  endif
  89.  
  90.  END newchars
  91.  
  92.