CPCWiki forum

General Category => Programming => Topic started by: funkheld on 12:39, 04 November 18

Title: I would like to turn on in cp / m plus the graphic mode 1 in asm.
Post by: funkheld on 12:39, 04 November 18

Hi good afternoon.
I would like to turn on in cp / m plus the graphic mode 1 in asm.
how is that possible?


Thank you.
greeting
Title: Re: I would like to turn on in cp / m plus the graphic mode 1 in asm.
Post by: AMSDOS on 23:50, 04 November 18
Quote from: funkheld on 12:39, 04 November 18
Hi good afternoon.
I would like to turn on in cp / m plus the graphic mode 1 in asm.
how is that possible?


Thank you.
greeting


GSX would be the standard method to get into Mode 1 by using DDMODE1, there's information about it on John Elliott's website (http://www.seasip.info/Cpm/gsxint.html), though I don't know how it's accessed from Assembly.
Title: Re: I would like to turn on in cp / m plus the graphic mode 1 in asm.
Post by: HAL6128 on 16:08, 05 November 18
There's a description in the wiki in how to access the firmware (set mode) in CP/M:
http://www.cpcwiki.eu/index.php/Programming:Executing_firmware_functions_from_within_CP/M_2.1_or_CP/M_plus
Have a try...
Title: Re: I would like to turn on in cp / m plus the graphic mode 1 in asm.
Post by: AMSDOS on 21:08, 05 November 18
Not sure if this will work because I'm interpreting it from a bit of Turbo Pascal code, though from the looks of it, it appears BDOS Function 4 followed by number representing mode will give that Screen Mode, but I'm not sure.


If I've interpreted it correctly it should look like this:



ld c,4
ld e,1
call 5
Title: Re: I would like to turn on in cp / m plus the graphic mode 1 in asm.
Post by: GUNHED on 22:42, 05 November 18
Use control characters, ESC 2 1 as I remember, see CPC Manual ;-)
Title: Re: I would like to turn on in cp / m plus the graphic mode 1 in asm.
Post by: funkheld on 13:40, 06 November 18
Hello, thanks.
CP/M PLUS and GRAFIK-DEMO.

ASM : PASMO

CP/M PLUS (MODE, PLOT) :

org &100


scr_set_mode equ &bc0e
plot_absolute equ &bbea


ld hl,(&0001)
ld de,&0057
add hl,de
ld (firm_jump+1),hl


jp start
ret


start
ld a,2
call firm_jump
defw scr_set_mode


ld de,100
ld hl,100
call firm_jump
defw plot_absolute
ret


firm_jump
jp 0





CP/M PLUS (MODE, PLOT, DRAW) :

org &100


scr_set_mode equ &bc0e
plot_absolute equ &bbea
gra_line_absolute  equ &bbf6


ld hl,(&0001)
ld de,&0057
add hl,de
ld (firm_jump+1),hl


jp start
ret


start
ld a,2
call firm_jump
defw scr_set_mode


ld de,50
ld hl,100
call firm_jump
defw plot_absolute


ld de,200
ld hl,70
call firm_jump
defw gra_line_absolute
ret


firm_jump
jp 0


greeting
Powered by SMFPacks Menu Editor Mod