diff --git a/interfaces/native/image.c b/interfaces/native/image.c index a420b40..39c5014 100644 --- a/interfaces/native/image.c +++ b/interfaces/native/image.c @@ -1,6 +1,6 @@ #include -int32_t ngaImageCells = 9917; -int32_t ngaImage[] = { 1793,-1,9840,9916,201906,0,10,1,10,2,10,3,10,4,10,5,10,6,10, +int32_t ngaImageCells = 9953; +int32_t ngaImage[] = { 1793,-1,9876,9952,201906,0,10,1,10,2,10,3,10,4,10,5,10,6,10, 7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,10, 17,10,18,10,19,10,20,10,21,10,22,10,23,10,24,10,25,10,26,10, 68223234,1,2575,85000450,1,656912,355,339,268505089,66,65,135205121,66,10,101384453,0,9,10,2049,59, @@ -159,7 +159,7 @@ int32_t ngaImage[] = { 1793,-1,9840,9916,201906,0,10,1,10,2,10,3,10,4,10,5,10,6, 2065,10,1,3112,2049,2065,4,16,10,3093,3146,147,118,58,117,112,100,97,116,101, 45,117,115,105,110,103,0,4,1793,3153,15,4,8,10,1,3149,2049,2077,16,10, 3128,3167,147,99,111,112,121,0,1793,3176,1,59,2049,2065,2049,62,10,1,3169,2049, - 2252,3,3,10,3159,3196,147,83,99,111,112,101,76,105,115,116,0,9303,9358,10, + 2252,3,3,10,3159,3196,147,83,99,111,112,101,76,105,115,116,0,9338,9394,10, 3183,3205,147,123,123,0,2049,1570,2,1,3196,2049,62,16,10,3199,3230,147,45,45, 45,114,101,118,101,97,108,45,45,45,0,2049,1570,1,3196,2049,2908,16,10,3214, 3244,147,125,125,0,1,3196,2049,59,4,15,11,1793,3258,3841,3196,4097,2,10,1, @@ -466,33 +466,35 @@ int32_t ngaImage[] = { 1793,-1,9840,9916,201906,0,10,1,10,2,10,3,10,4,10,5,10,6, 111,58,105,110,98,0,1,0,2049,9248,10,9255,9281,147,105,111,58,111,117,116, 98,0,1,1,2049,9248,10,9270,9298,147,105,111,58,115,116,111,114,101,0,1, 2,2049,9248,10,9286,9315,147,105,111,58,102,101,116,99,104,0,1,3,2049,9248, - 10,9303,9330,134,78,117,109,98,101,114,0,0,48,49,50,51,52,53,54,55, - 56,57,65,66,67,68,69,70,0,9320,9331,134,68,73,71,73,84,83,0,9348, - 9369,147,99,111,110,118,101,114,116,0,1,9331,4,2049,4082,3841,9330,1,16,19, - 17,4097,9330,10,9303,9395,159,112,114,101,102,105,120,58,48,0,2049,2908,1,0, - 4097,9330,1793,9406,2049,9369,10,1,9403,2049,4023,3841,9330,2049,134,10,9383,112,134,67, - 77,79,83,58,65,68,68,82,69,83,83,0,9415,113,134,67,77,79,83,58, - 68,65,84,65,0,9431,9457,147,114,116,99,58,113,117,101,114,121,0,1,112, - 2049,9281,1,113,2049,9265,10,9444,9480,147,114,116,99,58,115,101,99,111,110,100, - 0,1,0,2049,9457,10,9466,9499,147,114,116,99,58,109,105,110,117,116,101,0, - 1,2,2049,9457,10,9485,9516,147,114,116,99,58,104,111,117,114,0,1,4,2049, - 9457,10,9504,9532,147,114,116,99,58,100,97,121,0,1,7,2049,9457,10,9521,9550, - 147,114,116,99,58,109,111,110,116,104,0,1,8,2049,9457,10,9537,9567,147,114, - 116,99,58,121,101,97,114,0,1,9,2049,9457,10,9555,9580,147,116,105,109,101, - 0,2049,9516,2049,8964,1,58,2049,8900,2049,9499,2049,8964,2049,8913,10,9572,1016,134,115, - 101,114,105,97,108,58,67,79,77,49,0,9595,760,134,115,101,114,105,97,108, - 58,67,79,77,50,0,9610,1000,134,115,101,114,105,97,108,58,67,79,77,51, - 0,9625,744,134,115,101,114,105,97,108,58,67,79,77,52,0,9640,9670,134,115, - 101,114,105,97,108,58,80,111,114,116,0,1016,9655,9686,147,115,101,114,105,97, - 108,58,112,111,114,116,0,3841,9670,10,9671,9709,147,115,101,114,105,97,108,58, - 114,101,99,101,105,118,101,100,63,0,2049,9686,1,5,17,2049,9265,1,1,21, - 2049,2583,10,9689,9739,147,115,101,114,105,97,108,58,101,109,112,116,121,63,0, - 2049,9686,1,5,17,2049,9265,1,32,21,2049,2583,10,9722,9767,147,115,101,114,105, - 97,108,58,114,101,97,100,0,2049,9709,1793,9776,2049,9686,2049,9265,10,1,9771,2049, - 2494,2049,9767,10,9752,9799,147,115,101,114,105,97,108,58,119,114,105,116,101,0, - 2049,9739,1793,9808,2049,9686,2049,9281,10,1,9803,2049,2494,2049,9799,10,9783,9830,147,115, - 101,114,105,97,108,58,115,101,110,100,0,1793,9835,2049,9799,10,1,9832,2049,4023, - 10,9815,9855,147,115,101,114,105,97,108,58,105,110,105,116,0,1,0,2049,9686, - 1,1,17,2049,9281,1,128,2049,9686,1,3,17,2049,9281,1,3,2049,9686,2049,9281, - 1,0,2049,9686,1,1,17,2049,9281,1,3,2049,9686,1,3,17,2049,9281,1,199, - 2049,9686,1,2,17,2049,9281,1,11,2049,9686,1,4,17,2049,9281,10,0 }; + 10,9303,9333,147,105,111,58,115,116,111,114,101,98,0,1,4,2049,9248,10,9320, + 9351,147,105,111,58,102,101,116,99,104,98,0,1,5,2049,9248,10,9338,9366,134, + 78,117,109,98,101,114,0,0,48,49,50,51,52,53,54,55,56,57,65,66, + 67,68,69,70,0,9356,9367,134,68,73,71,73,84,83,0,9384,9405,147,99,111, + 110,118,101,114,116,0,1,9367,4,2049,4082,3841,9366,1,16,19,17,4097,9366,10, + 9338,9431,159,112,114,101,102,105,120,58,48,0,2049,2908,1,0,4097,9366,1793,9442, + 2049,9405,10,1,9439,2049,4023,3841,9366,2049,134,10,9419,112,134,67,77,79,83,58, + 65,68,68,82,69,83,83,0,9451,113,134,67,77,79,83,58,68,65,84,65, + 0,9467,9493,147,114,116,99,58,113,117,101,114,121,0,1,112,2049,9281,1,113, + 2049,9265,10,9480,9516,147,114,116,99,58,115,101,99,111,110,100,0,1,0,2049, + 9493,10,9502,9535,147,114,116,99,58,109,105,110,117,116,101,0,1,2,2049,9493, + 10,9521,9552,147,114,116,99,58,104,111,117,114,0,1,4,2049,9493,10,9540,9568, + 147,114,116,99,58,100,97,121,0,1,7,2049,9493,10,9557,9586,147,114,116,99, + 58,109,111,110,116,104,0,1,8,2049,9493,10,9573,9603,147,114,116,99,58,121, + 101,97,114,0,1,9,2049,9493,10,9591,9616,147,116,105,109,101,0,2049,9552,2049, + 8964,1,58,2049,8900,2049,9535,2049,8964,2049,8913,10,9608,1016,134,115,101,114,105,97, + 108,58,67,79,77,49,0,9631,760,134,115,101,114,105,97,108,58,67,79,77, + 50,0,9646,1000,134,115,101,114,105,97,108,58,67,79,77,51,0,9661,744,134, + 115,101,114,105,97,108,58,67,79,77,52,0,9676,9706,134,115,101,114,105,97, + 108,58,80,111,114,116,0,1016,9691,9722,147,115,101,114,105,97,108,58,112,111, + 114,116,0,3841,9706,10,9707,9745,147,115,101,114,105,97,108,58,114,101,99,101, + 105,118,101,100,63,0,2049,9722,1,5,17,2049,9265,1,1,21,2049,2583,10,9725, + 9775,147,115,101,114,105,97,108,58,101,109,112,116,121,63,0,2049,9722,1,5, + 17,2049,9265,1,32,21,2049,2583,10,9758,9803,147,115,101,114,105,97,108,58,114, + 101,97,100,0,2049,9745,1793,9812,2049,9722,2049,9265,10,1,9807,2049,2494,2049,9803,10, + 9788,9835,147,115,101,114,105,97,108,58,119,114,105,116,101,0,2049,9775,1793,9844, + 2049,9722,2049,9281,10,1,9839,2049,2494,2049,9835,10,9819,9866,147,115,101,114,105,97, + 108,58,115,101,110,100,0,1793,9871,2049,9835,10,1,9868,2049,4023,10,9851,9891,147, + 115,101,114,105,97,108,58,105,110,105,116,0,1,0,2049,9722,1,1,17,2049, + 9281,1,128,2049,9722,1,3,17,2049,9281,1,3,2049,9722,2049,9281,1,0,2049,9722, + 1,1,17,2049,9281,1,3,2049,9722,1,3,17,2049,9281,1,199,2049,9722,1,2, + 17,2049,9281,1,11,2049,9722,1,4,17,2049,9281,10,0 }; diff --git a/interfaces/native/io_x86.forth b/interfaces/native/io_x86.forth index 9f412b2..1675c05 100644 --- a/interfaces/native/io_x86.forth +++ b/interfaces/native/io_x86.forth @@ -19,6 +19,8 @@ will be used in the implementation of the device drivers. :io:outb (vp-) #1 io:portio ; :io:store (va-) #2 io:portio ; :io:fetch (a-v) #3 io:portio ; +:io:storeb (va-) #4 io:portio ; +:io:fetchb (a-v) #5 io:portio ; ~~~ # Hexadecimal diff --git a/interfaces/native/retro.c b/interfaces/native/retro.c index fecca3c..22438e1 100644 --- a/interfaces/native/retro.c +++ b/interfaces/native/retro.c @@ -91,14 +91,24 @@ void outportb(unsigned int port,unsigned char value) } void store() { - int address = stack_pop(); - int value = stack_pop(); + long address = stack_pop(); + long value = stack_pop(); *((int*)address) = value; } void fetch() { stack_push(*((int*)stack_pop())); } + +void storeb() { + long address = stack_pop(); + long value = stack_pop(); + *((char *)address) = (char)value; +} + +void fetchb() { + stack_push((long)*((char*)stack_pop()) & 0xFF); +} #endif @@ -368,6 +378,10 @@ void portio() { break; case 3: fetch(); break; + case 4: storeb(); + break; + case 5: fetchb(); + break; } }