Author Topic: Memory???  (Read 1481 times)

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Memory???
« on: April 23, 2021, 05:26:11 PM »
First what page does my. Com file endup in?
Drawing I use the usual A000, but what pages is best usable for backbuffer and other things, like draw a big image in advance, before showing little part on screen?
SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

LiaoMi

  • Member
  • ****
  • Posts: 922

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #2 on: April 24, 2021, 12:17:47 AM »
thanks LiaoMi  :thumbsup:
I am after to switch DS to several 64k block and output big images without it crashes and final output to A000(ES)


SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

LiaoMi

  • Member
  • ****
  • Posts: 922
Re: Memory???
« Reply #3 on: April 24, 2021, 01:13:51 AM »

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #4 on: April 25, 2021, 08:47:56 PM »
thanks :thumbsup:
scrolling with a rossler attractor you can control with arrow keys,esc=quit





« Last Edit: June 05, 2021, 10:48:50 PM by daydreamer »
SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 8491
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Memory???
« Reply #5 on: April 27, 2021, 04:10:40 AM »
Somewhere back in the long distant past I used to extract some extra memory for a DOS app by using the VGA address at A000h and going up to B7FF which at the time I used it for some utilities that would struggle to fit into DOS range memory. I think you had to twiddle HIMEM.SYS but it could be done.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #6 on: April 27, 2021, 06:38:48 PM »
Hutch I start simplest segment switching first before use vesa interrupts for vram
Want to finish it like it was meant to be:scrolling thru big racetrack = big memory buffer for map
updated: or waterways


« Last Edit: April 29, 2021, 05:58:56 AM by daydreamer »
SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #7 on: April 29, 2021, 05:46:14 PM »
What's best,use [BP] that uses. Ss = cs in. Com file if not changed or cs: override to retrieve LUT data + other data from source file that ends up in cs=ds=Ss=es when loaded?
Mov ax,page
Mov ds,ax
Vs LDS?
reading DOS AoA

SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

FORTRANS

  • Member
  • *****
  • Posts: 1109
Re: Memory???
« Reply #8 on: April 30, 2021, 06:20:39 AM »
Hi,

What's best,use [BP] that uses. Ss = cs in. Com file if not changed or cs: override to retrieve LUT data + other data from source file that ends up in cs=ds=Ss=es when loaded?
Mov ax,page
Mov ds,ax
Vs LDS?

   What is better or best between;
Code: [Select]
    MOV AX,Seg
    MOV DS,AX
...
    LDS Reg,Pointer ; Load DS and register with long pointer.

depends on your personal tastes.  The only time you need
to use the load segment instruction is when you load the
stack segment and stack pointer (LSS).  That needs to be
atomic to prevent {rare} interrupts between two moves
to do the same thing.  IIRC of course.  Loading DS is less
constrained.  Use whichever makes sense to you.

Cheers,

Steve N.


daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #9 on: April 30, 2021, 06:31:45 PM »
thanks Steve N. :thumbsup:
LDS probably easier to use with already 32bit pointer (e)si register start of loop,but switching seg in outerloop maybe only need
inc ah
mov ds,ax
had annoying bug because still thinking in 32bit crashes,ret 8 and ret 12(thinking 4 * arguments)

so if I want as much continuious memory buffer,from original CS,SS,DS segment after the code and few variables upto B7ffh,any advice where to move SS:stack?
highest segment or any UMB? or going downward from 0B7ffh ?
seem I have to use a segment  between A000h and memory buffer I copy/scroll from



« Last Edit: May 02, 2021, 10:08:59 PM by daydreamer »
SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #10 on: May 07, 2021, 06:47:09 PM »
More advanced, is it possible to copy everything loaded to uppermost segment and jump there?
SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

FORTRANS

  • Member
  • *****
  • Posts: 1109
Re: Memory???
« Reply #11 on: May 07, 2021, 10:43:07 PM »
Hi,

More advanced, is it possible to copy everything loaded to uppermost segment and jump there?

   Should be.  You just end up with two copies in memory.  So I don't see
any advantage for a normal program.  (Not being a device driver, TSR or
some other strange case.)

Regards,

Steve N.

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #12 on: May 09, 2021, 06:49:36 AM »
try to get 16bit(word) colors vesa modes,but doesnt get bankswitching to work
fixed thanks Steve N. :thumbsup:


« Last Edit: May 11, 2021, 06:01:56 AM by daydreamer »
SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P

FORTRANS

  • Member
  • *****
  • Posts: 1109
Re: Memory???
« Reply #13 on: May 09, 2021, 11:18:32 PM »
Hi,

   Set BH to zero to change banks.  BH set
to one is an inquiry of the current settings.

Steve N.

daydreamer

  • Member
  • *****
  • Posts: 1719
  • building nextdoor
Re: Memory???
« Reply #14 on: June 05, 2021, 11:34:45 PM »
using more FS,GS segment registers help
SIMD fan and macro fan
why assembly is fastest is because its switch has no (brakes) breaks
:P
only in 16bit assembly you can get away with "Only words" :P