Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Graphics Mode Printing
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 7th February 00:29
bpetria
External User
 
Posts: 1
Default Graphics Mode Printing



Hi,

I am trying to print solid horizontal lines on a Panasonic KX-P1180 dot
matrix printer in graphics mode. The printer book list the command for double
density graphics (960 dots per line) as (dec) "27, 76, n1, n2, Data"
I do not know if "n1, n2" is suppose to represent the number of
times to print "Data" or what? Is "Data" a single number from
0 - 255 (dec) which represents an 8 bit sequence to print?

Thanks in advance, Brad

Tip for your old computer (reduce discard pollution too):

If you can't sell your old computer, don't throw it away. Use it to backup
your software by transferring files/folders from your new computer or laptop
to it. I transferred my Windows folder and other stuff to my old computer
using "PC Link", which I downloaded from http://www.simtel.net (cool site).

http://www.simtel.net/pub/dl/52792.html (info or download)
  Reply With Quote


  sponsored links


2 7th February 00:30
anoneds
External User
 
Posts: 1
Default Graphics Mode Printing



n1 and n2 are # of dots (horizontal resolution) of the image. This is
all off the top of my head... actually, I edited this by finding my
old Gemini 10x manual.
#dots=n1+*256*n2
This should be followed by the data (1 byte per horizontal dot). So if
#dots=720, you'd have 720 bytes.
These bytes depend on your printer. If your mode supports 8-bit, each
byte is a 1x8 strip (vertical). The numbering begins at the bottom of
your character. Say you want to print this character: (0 - off 1 - on)

00100
00100
00100
11111
00100
00100
00100
00100

A "+" in an 8x5 representation. n1=5, n2=0 The first column is, from
the bottom, "00001000".
This is 0*2^0+0*2^1+0*2^2+0*2^3+1*2^3+0*2^4+0*2^5+0*2^6+0* 2^7=8 (first
byte)
This is 0*2^0+0*2^1+0*2^2+0*2^3+1*2^3+0*2^4+0*2^5+0*2^6+0* 2^7=8 (2nd
byte)
This is 1*2^1+1*2^1+1*2^2+1*2^3+1*2^3+1*2^4+1*2^5+1*2^6+1* 2^7=255
(third byte)
This is 0*2^0+0*2^1+0*2^2+0*2^3+1*2^3+0*2^4+0*2^5+0*2^6+0* 2^7=8
(fourth byte)
This is 0*2^0+0*2^1+0*2^2+0*2^3+1*2^3+0*2^4+0*2^5+0*2^6+0* 2^7=8 (fifth
byte)

So, you should print chr$(x), for x={27,76,5,0,8,8,255,8,8}

Beware of chr$(13) being generated, as Basic likes to add a LF to a
CR.
The old Gemini had a setting for 7/72 line feed so you could ignore
the first bit. But my old TI-99 didn't have the chr$(13) problem, so I
could use all the pins at once...

Ben

Someone who remembers too much. The only part I had to change above
was I had "n1*256+n2"...
  Reply With Quote
3 7th February 00:30
anoneds
External User
 
Posts: 1
Default Graphics Mode Printing


Oops, better editing next time #dots=n1+256*n2

Ben
  Reply With Quote
4 7th February 00:30
bob may
External User
 
Posts: 1
Default Graphics Mode Printing


N1 and so forth will be defined at either the beginning or the end of the
list of codes.

--
There are more Democrats on the Calif. Special Election than Republicans!
Go count if you don't believe me!
Bob May
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666