News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

How is basic routine implemented in ASM?

Started by funkheld, 13:15, 12 November 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

funkheld


Hi good afternoon.
How is this routine implemented in ASM?
-----------------------------------------
POKE & B7C6, & 40
CALL & BC06, & 40
----------------------------------------


This does not work:
-----------------------------------
ld hl, # b7c6
ld (hl), # 40
Id a, # 40
call # bc06
--------------------------------


  Thank you.
Greeting

Targhan

I replied to you on the other thread, why did you create a new one? Use DE, not A:

ld hl, # b7c6
ld (hl), # 40
ld de, # 40
call # bc06
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

funkheld


funkheld

#3
this is on error.
in the picture, bytes also move.

memory &3fff
start by &8000

ld hl,#b7c6
ld (hl),#40
ld de,#40
call #bc06   

thanks.
greeting   

Targhan

Mmmh, I'm no firmware expert, but you probably want to try to change the screen offset to #4000, is that correct?
According to this page, the call is #bc08, not #bc06, exact?
And A must be #40 for #4000.


So...
ld a,#40
call #bc08


Please tell us exactly what you want.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

funkheld


- I would like to switch in asm the screen on # 4000 and with the
   screen # 4000 work (print etc ...,).
- I would like to switch the screen on # C000 in asm and with the
   screen # C000 work (print etc ...,)


Thnaks.
greeting.

funkheld


- I would like to switch in asm the screen on # 4000 and with the
   screen # 4000 work (print etc ...,).
- I would like to switch the screen on # C000 in asm and with the
   screen # C000 work (print etc ...,)


Thnaks.
greeting.

andycadley

ld a,&40
call &bc08



That will set the screen base to #4000 and the firmware routines like PRINT etc will write to that screen. It won't clear the screen or anything, so if there is anything in that memory you'll see junk on the screen until you do a CLEAR or MODE - MODE is probably preferable as that will also reset the screen offset (alternately call the firmware routine at &BC05 with HL =0 to reset the offset)

AMSDOS

@HAL 6128 made an BASIC example in the Hisoft Pascal 4T thread which animates a Bouncing Ball between screens placed at &4000 and &C000 to reduce flicker, is this what you're interested in? Their example uses OUT to switch screens, however POKE is used to switch screens without displaying it, so then the screen can be cleared and drawing taking place without display and the OUT commands take care of the rest.


Obviously that approach is going to use more memory, so any ASM would have to be below &4000 or &8000 onwards.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

funkheld


Powered by SMFPacks Menu Editor Mod