home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1996
/
ARCHIVE_96.iso
/
discs
/
mag_discs
/
volume_1
/
issue_02
/
minidump5
< prev
next >
Wrap
Text File
|
1987-10-18
|
2KB
|
74 lines
├O.⌠ > MiniDump5 : A self-contained function.
├P#▌ ñminidump(margin%,threshold%)
├Z⌠ The BASIC version.
├d:
├n:
├x9τ margin%>79 ä threshold%>255 î =ú :⌠ Bad parameters.
Â:
Ì:
├ûEΩ left%,bottom%,right%,top%,xorigin%,yorigin%,xconvert%,yconvert%
├á=Ω line%,x%,points%,pixel%,printcode%,strike%,colour%,vdu%
ê
▐ vdu% 39
├┤:
├╛:
├╚!(vdu%+ 0)= 4
├╥!(vdu%+ 4)= 5
├▄!(vdu%+ 8)=128
├µ!(vdu%+12)=129
├≡!(vdu%+16)=130
├·!(vdu%+20)=131
─!(vdu%+24)=136
─!(vdu%+28)=137
─!(vdu%+32)=-1
─"&╚Ö "OS_ReadVduVariables",vdu%,vdu%
─,xconvert%=!(vdu%+ 0)
─6yconvert%=!(vdu%+ 4)
─@left% =!(vdu%+ 8)
─Jbottom% =!(vdu%+12)
─Tright% =!(vdu%+16)
─^top% =!(vdu%+20)
─hxorigin% =!(vdu%+24)
─ryorigin% =!(vdu%+28)
─|:
─å:
─ÉHleft% = (left%<<xconvert%)-xorigin% :⌠ These are the screen
─ÜGright% = ((right%+1)<<xconvert%)-xorigin%-1 :⌠ co-ordinates of the
─ñHbottom%= (bottom%<<yconvert%)-yorigin% :⌠ the graphics window.
─«3top% = ((top%+1)<<yconvert%)-yorigin%-1 :⌠
─╕:
─┬:
─╠Ipoints%=(right%-left%+1)ü4 :⌠ The number of printed points per line.
─╓:
─α:
─Ω%⌠ *FX 3,10 sends to printer only.
─⌠*FX 3,10
─■/∩ 27,64 :⌠ Initialise the printer.
┼=∩ 27,65,8 :⌠ 8/72" line spacing = 8 dots per line.
┼/∩ 27,108,margin% :⌠ Left margin is margin%.
┼:
┼&:
┼0 π line%=top% ╕ bottom% ê -32
┼:9∩ 27,42,5,points%â&100,points%ü&100:⌠ Printer mode 5.
┼Dπ x%=left% ╕ right% ê 4
┼NCprintcode%=0 :⌠ Initialise the value sent to the printer.
┼X9π pixel%=7 ╕ 0 ê -1 :⌠ Assemble 'colour' of 8 pixels.
┼bDcolour%=░x%,line%-28+(pixel%<<2)) :⌠ If colour% is greater
┼lHprintcode%+=(-(colour%>threshold%))<<pixel% :⌠ than threshold% then
┼v=φ pixel% :⌠ print a dot.
┼ÇF∩ printcode% :⌠ One printhead strike prints a column of 8 dots.
┼èφ x%
┼ö5∩ 10,13 :⌠ Line feed and carriage return.
┼₧φ line%
Ũ:
┼▓:
┼╝!∩ 12 :⌠ Form feed.
┼╞)∩ 27,64 :⌠ Reset the printer.
┼╨:
┼┌1⌠ *FX 3,0 restores output to the screen only.
┼Σ*FX 3,0
┼ε:
┼°=╣
╞: