Pokes

Post your SmartBASIC questions here
Post Reply
User avatar
Milli
Site Admin
Posts: 137
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Pokes

Post by Milli » Wed Jul 01, 2020 9:53 am

Code: Select all



------------------------------------------------------------
     POKES = PEEK = CALLS = AND OTHER ADAM PROGRAM HINTS
------------------------------------------------------------
============================================================
==       == ALL LISTED HERE ARE FOR SMARTBASIC 1.0
== POKES == [ all numbers will need the command "POKE" added
==       ==   before them to work right! ]
============================================================

1146,(ASCII DEC LETTER CODE to change the right bracket)

12185,(128-239 This will let you make the program
     lines up to a length of 239 characters long)

15824,216:15830,8:15831,55:15832,19(This will fix your copy
     of SmartBASIC 1.0 so that it only has one space between
     the DATA or REM statements)

16821,(drive reset - D1=8, D2=24, D5=4 and D6=5)

16953,(ASCII DEC LETTER CODE to change cursor from
     underscore)

16958,16:16993,8:16995,16(this will increase the TEXT
     window in the graphic modes to eight lines from the
     default mode of four text lines. Changing modes (AKA.
     going from the GR mode to the HGR or TEXT mode) will
     reset the text window to its four line default setting)

17000,1(to stop cursor from flashing. Poke a "0" or use a
     TEXT command to get cursor flashing again)

17059,(TEXT background color)

17115,(TEXT normal letter color)*16+(TEXT normal screen
     color)

17126,(TEXT inverse letter color)*16+(TEXT inverse screen
     color)

17164,(ASCII DEC CODE this will fill the primary TEXT screen
     with any of the codes you select)

17198,(This will set the display area of the bottom of the
     screen [default setting 23])

17199,(This will let you change the right margin being
    displayed on the screen [default setting 30])

17201,(This will let you change the top of the screens
     display area [default setting 00])

17202,(This will let you change the left margin display
     area on the screen [default setting 01])

17291,(cursor blinking speed with "0"= steady on to
     "255"=slowest rate of flashing)

17302,255(This will disable the "CONTROL-P" to reenable it
     poke in 16)

17954,(0-63 will change the pitch of the bell sound of the
     CHR$(7) command. The lower the number the higher
     the pitch!)

17963,(0-255 will change the duration of the bell sound of
     the CHR$(7) command. The lower the number the shorter
     the duration of the sound.)

18607,(GR background color)

18633,(GR window color)*16+(GR window color)

18711,(GR normal letter color)*16+(GR normal letter color)

20183,3:20187,14:20188,2:20189,0:20190,0(Will let you change
     the command CATALOG to a shorter command CAT)

25431,(HGR background color)

25471,(HGR window color)*16+(HGR window color)

25568,(HGR normal letter color)*16+(HGR normal letter color)


============================================================
==       == ALL LISTED HERE ARE FOR SMARTBASIC 2.0
== POKES == [ all numbers will need the command "POKE" added
==       ==   before them to work right! ]
============================================================

16771,(ASCII DEC CODE by pokeing this code here it can then
     be displayed by being CALLed by 16770)

17184,(TEXT border color)

17240,(Normal text color)*16+(Normal text color)

17251,(Inverse text color)*16+(Inverse background color)

19361,3:19365,14:19366,02:19367,00:19368,00(This will let
     you us the shortend CAT command in place of the
     CATALOG command)


============================================================
==       == ALL LISTED HERE ARE FOR SMARTBASIC 1.0
== CALLS == [ all numbers will need the command "CALL" added
==       ==   before them to work right! ]
============================================================

17046(Will cause all of your screen colors to be printed in
         secondary screen memory)

27407(Read from VRAM)

27420(Write to VRAM)

64560(System reset, checks all drives for media to load)

64605(Hard init, all systems reset)

64638(Initiate a status request command)

64641(Initiate a keyboard status request)

64644(Status of printer)

64647(Status of data drive)

64650(Scan active devices)

64659(Reset keyboard)

64662(Reset printer)

64665(Reset data drive)

64743(this will send you to the Typewriter mode of
     of SmartWRITER)


============================================================
==       == ALL LISTED HERE ARE FOR SMARTBASIC 2.0
== CALLS == [ all numbers will need the command "CALL" added
==       ==   before them to work right! ]
============================================================

16770(Will call what ever ASCII DEC CODE that was POKEd into
     16771 and display it on the screen)


============================================================
==      APPLE  TO  ADAM      == ALL COMMANDS LISTED HERE
==        CONVERSIONS        == ARE FOR SMARTBASIC 1.0
============================================================

APPLE COMMAND ================ ADAM COMMAND ==

HAND CONTROLLER               PDL(x)

CALL -198                     ? CHR$(7);
     (Bell sound)

CALL -868                     HTAB 1:?:VTAB VPOS(0)
     (Clears line)

CALL -3288                    RESUME

PEEK(36)                      POS(1)
     (Cursor postion)           or PEEK(17002)

PEEK(37)                      VPOS(1)
     (Vert. cursor postion)     or PEEK(17001)

PEEK(216)                     NOT USED BY ADAM

PEEK(219)#256+PEEK(218)       PEEK(16127)#256 :
                              &  PEEK(16126)

PEEK(222)                     ERRNUM(1)

PEEK(-16336),PEEK(-16352)     Cassette & speaker ignore

PEEK(-16384)                  PEEK(64885)
     (Keyboard)

POKE 36,x                     HTAB x
     (Move cursor)

POKE 216,0                    CLRERR

POKE 232,LS:POKE 233,HS       POKE 16766,LS :POKE 16767,HS
    (Shape table address)

POKE -16363;character #       POKE 16150,255 :
                              &  POKE 64885,chacter
     (Load keyboard buffer)

APPLE SCREEN SIZE = 40        ADAM SCREEN SIZE = 31

APPLE HGR SCREEN SIZE = 291   ADAM HGR SCREEN SIZE = 255
                            to convert x cordinates to ADAM
                            multiply by 255/291

PROGRAM LINE LENGTH = 255     ADAM PROGRAM LINE LENGTH = 128


============================================================
END OF FILE          END OF FILE          END OF FILE
============================================================




DOWNLOAD complete.
Milli

User avatar
joltguy
Posts: 52
Joined: Wed Aug 21, 2019 5:17 am
Location: Toronto, Canada
Contact:

Re: Pokes

Post by joltguy » Fri Jul 03, 2020 9:44 am

Good collection and a handy reference! I don't think I had seen this one before:

Code: Select all

12185,(128-239 This will let you make the program
     lines up to a length of 239 characters long)
Image

User avatar
Wmaalouli
Posts: 83
Joined: Sat Jul 20, 2019 2:09 pm

Re: Pokes

Post by Wmaalouli » Mon Jul 06, 2020 1:12 pm

Great reference, although I have a deep dislike for Basics that rely on them to access most of the computer's functions, such as the C64 Basic because they make the code practically unreadable without constantly having to refer to POKE and PEEK tables. I guess I was spoiled by the TI Extended Basic where these were hardly ever used except for a few esoteric functions.

JimN-NIAD
Posts: 22
Joined: Sat Jul 20, 2019 8:23 pm

Re: Pokes

Post by JimN-NIAD » Sun Aug 02, 2020 4:03 pm

Here is the POKEs, PEEKs and CALLs list for SmartBASIC 1.0 that I always used. I do not recall if it is complete, but should be very close.
Attachments
SmartBASIC v1.0 Pokes, Peeks and Calls.doc.zip
(6.43 KiB) Downloaded 3 times

JimN-NIAD
Posts: 22
Joined: Sat Jul 20, 2019 8:23 pm

Re: Pokes

Post by JimN-NIAD » Sun Aug 02, 2020 4:09 pm

Wmaalouli wrote:
Mon Jul 06, 2020 1:12 pm
Great reference, although I have a deep dislike for Basics that rely on them to access most of the computer's functions, such as...
Like the ADAM Computer, SmartBasic 1.0 was rushed and a lot of bugs, omissions and oversights were the result... especially the manual. SmartBasic 2.0 made great strides in fixing a lot of the bugs, but the plug was pulled on the ADAM and it was never completed for commercial distribution. SB 2.0 just never caught on in the community except for a couple P.D. volumes and a couple commercial released like Sub Raiders.

User avatar
joltguy
Posts: 52
Joined: Wed Aug 21, 2019 5:17 am
Location: Toronto, Canada
Contact:

Re: Pokes

Post by joltguy » Mon Aug 03, 2020 11:34 am

JimN-NIAD wrote:
Sun Aug 02, 2020 4:09 pm
... SB 2.0 just never caught on in the community except for a couple P.D. volumes and a couple commercial released like Sub Raiders.
It is very unfortunate... 2.0 is undeniably better but since (almost) all the programs out there target 1.0 that's what I end up using most of the time. One of the major enhancements in 2.0 is the EXTMEM command which adds support for 64K expander opening up roughly 95K for programs to use. However I haven't figured out how to actually address that memory in a POKE command. The highest POKE-able address is 65535 so how does one go about accessing that memory? Is it possible?

One of my favourite features of Super Basic Plus is they added a RAMPOKE command (and corresponding RAM() command for PEEKing) which allows you to utilize the expanded memory.
Image

Post Reply