--------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EBC00084Date: 07/02/97 From: GLEN MCNABB Time: 06:46pm \/To: PAUL WANKADIA (Read 1 times) Subj: protected mode Hi Paul, On <01 Jul, 12:58>, Paul Wankadia wrote to Jon Gentil : PW> JG> Word, DWord, QWord, or TByte. PW> What in all the blazes of heck is a "tbyte"??? A tbyte is a ten-bytes data value. Why does it exist, you might ask?. Simple enough. The first numeric co-processors used 80 bit registers. 80 bits is 10 bytes of data. g. --- ProBoard v2.16 [Reg] * Origin: NC/NEC SEWAnet, Bucolic Fair (1:3407/25) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EBC00085Date: 07/02/97 From: GLEN MCNABB Time: 06:52pm \/To: CRAIG HART (Read 1 times) Subj: Memory! Hi Craig, On <01 Jul, 11:42>, Craig Hart wrote to Herman Schonfeld : CH> > The 286 (technically referred to as the 80286) CH> > larger physical memory, better memory management, and hardware support CH> > for multi-tasking and task-switching operations. CH> CH> AFAIK the 80386 was the first processor to introduce hardware support for CH> multi-tasking and task-switching. Care to say how the '286 implements CH> this so-called 'hardware support'? Oh it did. It was sooooo slow it was faster to use the hard-drive to page tasks than use the internal hardware. The 386sx should have been what the 286 was supposed to be. Ahem... You noticed how short lived the 286 was? g. --- ProBoard v2.16 [Reg] * Origin: NC/NEC SEWAnet, Bucolic Fair (1:3407/25) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EBC00086Date: 07/02/97 From: MERVYN BALDWIN Time: 03:04am \/To: BARRY BLOCK (Read 1 times) Subj: Re: fade From: Mervyn Baldwin Subject: Re: fade >Hello Mervyn, Hello Barry, Sorry this has taken so long. I did post what follows but I never saw it but wasn't worried because, at the time, I never saw anything I posted. James Vahn tells me he has now fixed this and that, in all probability that particular mail didn't appear anyway. Since then have been extremely busy so I'll try again. I hope I'll see this one. From your mail I think you misunderstood what FADE was supposed to do. It did, as the name implies, a slow fade to black. Cutting out the delays as you did just made it into a very bad screen-clear. Maybe not all video cards will do this. Anyway, for anybody who can use it, here is A86 source for FADE.COM and FADEUP.COM. ;----------------------------------------------------------------- ;FADE. From PC magV4#12p296. ;Fades VGA screen. Recover by setting mode. mov ax,1017h ;read block colour regs xor bx,bx ;1st. reg to read mov cx,40h ;regs to read mov dx,offset buffer ;to hold reg values int 10h mov cx,40h L1: push cx mov cx,0c0 mov si,offset buffer L2: cmp b[si],0 je >L3 dec b[si] L3: inc si loop L2 call L6 mov dx,3dah ;port L4: in al,dx test al,8 jne L4 call L6 mov ax,1012h ;set block colour regs xor bx,bx ;1st. reg to set mov cx,40h ;regs to set mov dx,offset buffer ;of stored values int 10h pop cx loop L1 L5: ;Barry block suggests:- ;mov ah,1 ;check for keyhit ;int 16h ;jz L5 ;mov ax,0c00h ;clear keyboard buffer ;int 21h ;mov ax,003 ;set mode 3 ;int 10h ;This works fine but gets 25x80 mode. mov ax,4c00h int 21h L6: mov dx,3dah L7: in al,dx test al,8 je L7 ret buffer: ;----------------------------------------------------------------- ;FADEUP. If screen has been faded out (FADE.8) ; will fade it up again. Faulty. D86, for example ; doesn't display unless MODE has been used. ;Don't understand what is happening at uncommented ; part of source. ;Fadeup is rather fast as it stands. ;This, too, came from Vik Oliver's column in PC Magazine. MOV AH,3 ;Get cursor position & shape INT 010 PUSH DX ;save cursor position MOV AH,0F ;get AL=current display mode INT 010 OR AL,080 ;disable CLS XOR AH,AH ;set display mode=AL INT 010 MOV AX,01017 ;read block colour regs MOV CX,040 ;#blocks to read (from 0) MOV DX,offset buffer ;store results INT 010 POP DX ;get cursor position MOV AH,2 ;set cursor position INT 010 MOV DI,offset buffer2 ;fill buffer2 with zeros XOR AL,AL ; MOV CX,0C0 ; REP STOSB ; CALL setter MOV CX,040 L1: PUSH CX MOV CX,0C0 MOV SI,offset buffer L2: MOV AL,B[SI+0C0] CMP AL,B[SI] JAE >L3 INC B[SI+0C0] L3: INC SI LOOP L2 CALL delay CALL setter POP CX LOOP L1 exit: MOV AX,04C00 INT 021 delay: ;waits for vertical trace MOV DX,03DA ;status reg. RO. CRT controller L4: IN AL,DX TEST AL,8 ;loop until bit3 set then safe JE L4 ;to access for 1.25ms. RET setter: MOV AX,01012 ;set block of colour regs XOR BX,BX ;from reg 0 MOV CX,040 ;64 regs MOV DX,offset buffer2 ;store them here INT 010 RET buffer: db 0c0h dup(?) buffer2: ;----------------------------------------------------------------- I liked your idea of hitting a key to get the fadeup. The two together with the keyhit between make a fun CLS. -- vyn@abaldwin.demon.co.uk -!- --- * Origin: (1:346/100) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EBC00087Date: 07/02/97 From: MERVYN BALDWIN Time: 03:42am \/To: BARRY BLOCK (Read 1 times) Subj: Re: Redirection From: Mervyn Baldwin Subject: Re: Redirection Barry, >There were typing errors in the second listing concerning the init data. >A . instead of a , and another one I don't remember now. If so sorry about that. It's what comes from trying to tidy-up a listing and then not testing it again. Down with pretty-printing! BUT I just checked and the init string for my printer (in IBM mode at least) is 01b,040,01b,'S0',01b,'A',5,01b,'2$' ^ | It works fine on my printer. Maybe different on yours. Maybe different in Epson mode. >More important, it looks like you set the line spacing twice. Don't see where. Where? >Anyhow, this is what works for my LC-20 Star 9-dot. >I can draw a box that looks like one and there is white space between lines >when printing characters. > >init db 01Bh, 40h ;Esc@ ->reset printer > db 01Bh,'S0' ;EscS0 ->set Superscript > db 01Bh,'3',0Dh,24h ;Esc3 13 ->set 13/216" linespace > ; and string terminator I'll certainly try your line-spacing. Thanks! -------------------------------------------------------------- Here's the latest version. Still working on a check for the output redirection. Several people sent promising code but not got it incorporated yet. ;-------------------------------------------------------------- ;CRAMP.8 ->CRAMP.COM ;Use as: CRAMP PRN (or outfile) ;Prints text file compressed 150 lines + 8 empty lines ;Would need to change linecounter for B.Blocks linespace. jmp short start init db 01b,040 ;Esc @ -> Reset Printer db 01b,'S0' ;Set Superscript db 01b,'A',5 ;Set Linespace= 5/72 inch db 01b,'2$' ;Execute Esc A command ;Barry Blocks linespace. Comment out last two db lines above. ;and use instead... ; db 01b,'3',0d,'$' ; sets 13/216 linespace ;This works. Tighter spacing still but (on my printer) gets a bit ;confused with first two/three lines. erm db 'USAGE: CRAMP outfile.ext (or >PRN)',0d,0a,'$' feed db 9 dup(0a),'$' ;(8 gets 1 line short in 4 pages) buffer db '?' start: ;Courtesy of J. Vahn. Added routine mov ah,0b ;to check for correct input. int 021 ;Func 0B: Check STDIN status or al,al ;if redirection in use there will jz error ;be no char in kbd buffer lea dx,init ;send init string mov ah,9 int 21h xor si,si again: mov ah,03f mov bx,0 ;handle=STDIN mov cx,1 ;1 char lea dx,buffer ;to buffer int 21h cmp ax,0 ;AX=number of chars read je exit ;If none then end mov dl,b[buffer] ;else get buffer contents cmp dl,0a ;is it a LF jne pit ;if not then print char call counter ;else... pit: mov ah,2 ;print char (may be the LF) int 21h jmp again ;go for next char exit: mov dl,0dh ;clear buffer mov ah,2 int 21h mov ax,4c00h int 21h error: lea dx,erm mov ah,9 int 021 jmp exit counter: push dx ;preserve char in DL inc si ;count cmp si,150 ;is it EOP yet jne quit ;quit if not lea dx,feed ;else send 8 linefeeds mov ah,9 int 021 xor si,si ;and zero counter quit: pop dx ;get char back ret ;-------------------------------------------------------------- -- vyn@abaldwin.demon.co.uk -!- --- * Origin: (1:346/100)