You should try these:
INT 10 0E-- - VIDEO - TELETYPE OUTPUT
Category: V - video
Inp.:
AH = 0Eh
AL = character to write
BH = page number
BL = foreground color (graphics modes only)
Desc: display a character on the screen, advancing the cursor and scrolling
the screen as necessary
Notes: characters 07h (BEL), 08h (BS), 0Ah (LF), and 0Dh (CR) are interpreted
and do the expected things
IBM PC ROMs dated 4/24/81 and 10/19/81 require that BH be the same as
the current active page
INT 10 13-- - VIDEO - WRITE STRING (AT and later,EGA)
Category: V - video
Inp.:
AH = 13h
AL = write mode
bit 0: update cursor after writing
bit 1: string contains alternating characters and attributes
bits 2-7: reserved (0)
BH = page number
BL = attribute if string contains only characters
CX = number of characters in string
DH,DL = row,column at which to start writing
ES:BP -> string to write
Notes: recognizes CR, LF, BS, and bell; for the ET4000 BIOS, scrolling,
backspace, and CR only take place in the active page
also available PC or XT with EGA or higher
HP 95LX only supports write mode 00h
BUG: on the IBM VGA Adapter, any scrolling which may occur is performed on
the active page rather than the requested page
INT 10 0E-- - VIDEO - TELETYPE OUTPUT
Category: V - video
Inp.:
AH = 0Eh
AL = character to write
BH = page number
BL = foreground color (graphics modes only)
Desc: display a character on the screen, advancing the cursor and scrolling
the screen as necessary
Notes: characters 07h (BEL), 08h (BS), 0Ah (LF), and 0Dh (CR) are interpreted
and do the expected things
IBM PC ROMs dated 4/24/81 and 10/19/81 require that BH be the same as
the current active page
INT 10 13-- - VIDEO - WRITE STRING (AT and later,EGA)
Category: V - video
Inp.:
AH = 13h
AL = write mode
bit 0: update cursor after writing
bit 1: string contains alternating characters and attributes
bits 2-7: reserved (0)
BH = page number
BL = attribute if string contains only characters
CX = number of characters in string
DH,DL = row,column at which to start writing
ES:BP -> string to write
Notes: recognizes CR, LF, BS, and bell; for the ET4000 BIOS, scrolling,
backspace, and CR only take place in the active page
also available PC or XT with EGA or higher
HP 95LX only supports write mode 00h
BUG: on the IBM VGA Adapter, any scrolling which may occur is performed on
the active page rather than the requested page
Hello Despero.
Thanks for reply.
I have try your examples and are OK.
Do you know how can i use True Type Fonts ?
Thanks very much,Manos.
Thanks for reply.
I have try your examples and are OK.
Do you know how can i use True Type Fonts ?
Thanks very much,Manos.
I think you need to create a function to load the true type font file and draw each character from string.
I'll try to find some code about ttf.
I'll try to find some code about ttf.
Thanks for your interest.
Manos.
Manos.
Hello Manos!
I didn't find anything about true type fonts yet!
But you can see anything interesting in http://sealsystem.sourceforge.net/
It use true type font, and come with source, but it's not in assembly, it's i c++
i think!
I'm still looking for true type fonts and asm!
Regards!
Despero.
I didn't find anything about true type fonts yet!
But you can see anything interesting in http://sealsystem.sourceforge.net/
It use true type font, and come with source, but it's not in assembly, it's i c++
i think!
I'm still looking for true type fonts and asm!
Regards!
Despero.
Thank you Despero.
Manos.
Manos.
Hello Despero.
I am writing a BitBlt function.I use linear frame buffer.
Can you send me an example,if know about it ?
Regards,Manos.
I am writing a BitBlt function.I use linear frame buffer.
Can you send me an example,if know about it ?
Regards,Manos.
Hello Manos!
Try this 16 bit example.
; begin
;I didn't test yet.
; this moves a rectangle
; x1, y1: start position
; x2, y2: end position
; w1 : Width, h1 : Height
; sw : Screen width
; vm : 8, 16 or 32 bits video mode - assume 1 to 8 bits,2 to 16 or 4 to 32.
; es and ds point to buffer segment
; If you code 32 bits programs try to use 32 bit registers. :)
; You can use movsw or movsd to speed up the code.
; not optimized.
;saving registers
push ds
push es
push di
push si
push ax
push bx
push cx
push dx
mov bx, (segment of linear video buffer)
mov ds,bx
mov bx, (segment of temp buffer); to avoid overwriting the selected rectangle
mov es,bx
xor di,di ; es:di --> 0:0 coordinates of temp buffer
mov ax,
mul
add ax,
mul
mov si,ax
mov cx,
mov ax,
mul
mov ,ax
loop1: ;loop1 copies rectangle to temp buffer
push cx
mov cx,
rep movsb
add si,
pop cx
loop loop1
mov bx, (segment of linear video buffer)
mov es,bx
mov bx, (segment of temp buffer); to avoid overwriting the selected rectangle
mov ds,bx
xor si,si
mov ax,
mul
add ax,
mul
mov di,ax
mov cx,
loop2: ;loop2 copies temp buffer to linear video buffer
push cx
mov cx,
rep movsb
add di,
pop cx
loop loop2
pop dx
pop cx
pop bx
pop ax
pop si
pop di
pop es
pop ds
;data for test
x1 dw 10
y1 dw 10
x2 dw 100
y2 dw 100
w1 dw 50
h1 dw 15
vm dw 1
sw dw 800
; end
Regards,
Despero.
Try this 16 bit example.
; begin
;I didn't test yet.
; this moves a rectangle
; x1, y1: start position
; x2, y2: end position
; w1 : Width, h1 : Height
; sw : Screen width
; vm : 8, 16 or 32 bits video mode - assume 1 to 8 bits,2 to 16 or 4 to 32.
; es and ds point to buffer segment
; If you code 32 bits programs try to use 32 bit registers. :)
; You can use movsw or movsd to speed up the code.
; not optimized.
;saving registers
push ds
push es
push di
push si
push ax
push bx
push cx
push dx
mov bx, (segment of linear video buffer)
mov ds,bx
mov bx, (segment of temp buffer); to avoid overwriting the selected rectangle
mov es,bx
xor di,di ; es:di --> 0:0 coordinates of temp buffer
mov ax,
mul
add ax,
mul
mov si,ax
mov cx,
mov ax,
mul
mov ,ax
loop1: ;loop1 copies rectangle to temp buffer
push cx
mov cx,
rep movsb
add si,
pop cx
loop loop1
mov bx, (segment of linear video buffer)
mov es,bx
mov bx, (segment of temp buffer); to avoid overwriting the selected rectangle
mov ds,bx
xor si,si
mov ax,
mul
add ax,
mul
mov di,ax
mov cx,
loop2: ;loop2 copies temp buffer to linear video buffer
push cx
mov cx,
rep movsb
add di,
pop cx
loop loop2
pop dx
pop cx
pop bx
pop ax
pop si
pop di
pop es
pop ds
;data for test
x1 dw 10
y1 dw 10
x2 dw 100
y2 dw 100
w1 dw 50
h1 dw 15
vm dw 1
sw dw 800
; end
Regards,
Despero.
Have looked at the kelvar example from the FASM website? There are a few blit functions, both for linear and banked VESA framebuffers, controlled in 32-bit real mode (in "system\video.inc"). BTW I haven't got much feedback about this one, altough one day I was asking people to test it, because I'm still not sure that my latest unREAL tricks would work everywhere. Can you test it for me? (of course you need the true real mode DOS to run it) Please let me know how does it work and on what processor etc.
Thanks Despero,thanks Privalov.
I 'll test the codes and i 'll post reply when i have results.
Regards,Manos.
I 'll test the codes and i 'll post reply when i have results.
Regards,Manos.
Hello Despero.
I am writing an OS in UnReal Mode and i use linear/flat buffer of VESA.
I load edi with PhysBasePtr of ModeInfoBlock structure and i plot pixels
using : mov ,bx ;bx=16 bits color.
This works OK,but i have a query.The PhysBasePtr points at 3825205248
of memory.Where is this locality?
Regards,Manos.
I am writing an OS in UnReal Mode and i use linear/flat buffer of VESA.
I load edi with PhysBasePtr of ModeInfoBlock structure and i plot pixels
using : mov ,bx ;bx=16 bits color.
This works OK,but i have a query.The PhysBasePtr points at 3825205248
of memory.Where is this locality?
Regards,Manos.
Hello Manos,
I'm not sure about this, so look what de VBE(core functions) documentation say about it:
PhysBasePtr dd ? ; physical address for flat memory frame buffer
The PhysBasePtr is a 32-bit physical address of the start of frame buffer memory when the controller is in flat frame buffer memory mode. If this mode is not available, then this field will be zero. Note that the physical address cannot be used directly by the application, but must be translated by an operating system service to a linear address that can be used directly by the application (ie: the OS must create the page tables to map in this memory). Under a DPMI compatible environment this is done with DPMI function 0x800. Note also that it is possible for
the linear framebuffer memory to start at different locations for different modes.
Regards,
Despero
I'm not sure about this, so look what de VBE(core functions) documentation say about it:
PhysBasePtr dd ? ; physical address for flat memory frame buffer
The PhysBasePtr is a 32-bit physical address of the start of frame buffer memory when the controller is in flat frame buffer memory mode. If this mode is not available, then this field will be zero. Note that the physical address cannot be used directly by the application, but must be translated by an operating system service to a linear address that can be used directly by the application (ie: the OS must create the page tables to map in this memory). Under a DPMI compatible environment this is done with DPMI function 0x800. Note also that it is possible for
the linear framebuffer memory to start at different locations for different modes.
Regards,
Despero
Hello Despero.
I have the VBE documentation.I know all that you tell me.
My query is where is the address 3825205248 that points
the PhysBasePtr.
I use this number directly,as is,in Flat Real Mode,and it works OK.
I think that this address is in video card memory.
Regards,Manos.
I have the VBE documentation.I know all that you tell me.
My query is where is the address 3825205248 that points
the PhysBasePtr.
I use this number directly,as is,in Flat Real Mode,and it works OK.
I think that this address is in video card memory.
Regards,Manos.
Hello Manos,
I think you are right, but in my pc the motherboard has onboard devices, and the motherboard shares RAM with video device.
I think this value will change from a computer to other.
Regards,
Despero
I think you are right, but in my pc the motherboard has onboard devices, and the motherboard shares RAM with video device.
I think this value will change from a computer to other.
Regards,
Despero
Hello Despero.
Yes,i think that video card controls this pointer.
Regards,
Manos.
Yes,i think that video card controls this pointer.
Regards,
Manos.
What about your OS?
When I'll have a chance to test it?
When I'll have a chance to test it?
Hello Despero.
I have stop my OS because i have not any code for PS/2 port for mouse.
If i find any code,i 'll continue.
Now,i am building controls.
Have a look in Custom Controls Forum in ManosGrid and GenericGrid.
Thanks for your interest.
Regards,
Manos.
I have stop my OS because i have not any code for PS/2 port for mouse.
If i find any code,i 'll continue.
Now,i am building controls.
Have a look in Custom Controls Forum in ManosGrid and GenericGrid.
Thanks for your interest.
Regards,
Manos.
Hello,
You can find a drive with source and I think some explanation in:
http://cutemouse.sourceforge.net/index.html
the source is in asm, but I think it's not in fasm structure.
regards,
Despero
You can find a drive with source and I think some explanation in:
http://cutemouse.sourceforge.net/index.html
the source is in asm, but I think it's not in fasm structure.
regards,
Despero