CALL POKE
This page was last modified 13:43, 18 May 2020 by Mars2000you. Based on work by Gdx.

This instruction is available in DM-System2 Basic and Network Basic.

Contents

CALL POKE in DM-System2 Basic

Effect

Writes a value to a byte of the memory (RAM or VRAM).

Syntax

CALL POKE ([@]<Address>,<Value>)

Parameters

@ needs to be put before <address> to specify VRAM instead of RAM. Without this parameter, the value will be written to main RAM if the address is lower than 8000h.

<Address> is the address of destination. To avoid error messages, decimal numbers need to be used for addresses higher than FFFFh (65535).

If <Address> is negative the binary complement is used. This means CALL POKE(-1,0)=CALL POKE((65536-1),0).

If you specify a RAM address higher than 65534, specifications of the mapped RAM are used.

65535 + (number of available segments) × 16384 is the upper limit. If you specify a value exceeding this value, you get an "Out of memory" error.

<Value> is a decimal number between 0 and 255. It can also be a numeric expression.

Examples

CALL POKE (&HC000,100)
CALL POKE (@&H2000,175)
A=VDP(10)\8AND1:_POKE(&H430A,A*255)

Related to

CALL BLOCK, CALL PEEK, CALL PEEKS, CALL PEEKW, CALL POKES, CALL POKEW

Compatibility

DM-System2 BASIC


CALL POKE in Network Basic

Effect

Writes a value to a byte of the memory:

  • NetRAM only when the goal is your own computer (teacher or student)
  • RAM or NetRAM when the goal is the computer of a specific student (only available for the teacher)

The NetRAM is a special area of RAM mapped into the NetROM address space. Its size is 2048 bytes and it can be accessed on addresses 7800h to 7FFFh.

Syntax

CALL POKE (<Value>,<Address>,<StudentNumber>,<N>)

The two last parameters are optional. Parameters can not end with a comma alone.

Parameters

<Value> is a decimal number between 0 and 255.

<Address> is the address to write. It needs to be between 7800h and 7FFFh for the NetRAM.

<StudentNumber> is a number between 1 and 15. Only the teacher can use this parameter. He can use value 0 to poke the value to all student computers.

N needs to be used to write to an address in the NetRAM. It's only useful for the teacher.

Examples

CALL POKE (100,&H7800)
CALL POKE (144,&HB000,1)
CALL POKE (175,&H7A00,5,N)

Related to

CALL BRECEIVE, CALL BSEND, CALL PEEK

Compatibility

Network BASIC